Skip to content

Commit e9cb195

Browse files
committed
[DI] Element refs on _storage should be printed with self.
`_storage` comes from `assign_by_wrapper` instruction but user wrote `self.` in the source and that is what should get printed by DI diagnostics.
1 parent dcecf52 commit e9cb195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/SILOptimizer/Mandatory/DIMemoryUseCollector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ DIMemoryObjectInfo::getPathStringToElement(unsigned Element,
413413
std::string &Result) const {
414414
auto &Module = MemoryInst->getModule();
415415

416-
if (isAnyInitSelf())
416+
if (isAnyInitSelf() || getAsTypeWrapperLocalStorageVar())
417417
Result = "self";
418418
else if (ValueDecl *VD =
419419
dyn_cast_or_null<ValueDecl>(getLoc().getAsASTNode<Decl>()))

0 commit comments

Comments
 (0)