@@ -403,7 +403,7 @@ class IRGenSILFunction :
403
403
// / Keeps track of the mapping of source variables to -O0 shadow copy allocas.
404
404
llvm::SmallDenseMap<StackSlotKey, Address, 8 > ShadowStackSlots;
405
405
llvm::SmallDenseMap<llvm::Value *, Address, 8 > TaskAllocStackSlots;
406
- llvm::SmallDenseMap<Decl *, SmallString< 4 > , 8 > AnonymousVariables;
406
+ llvm::SmallDenseMap<Decl *, Identifier , 8 > AnonymousVariables;
407
407
// / To avoid inserting elements into ValueDomPoints twice.
408
408
llvm::SmallDenseSet<llvm::Value *, 8 > ValueVariables;
409
409
// / Holds the DominancePoint of values that are storage for a source variable.
@@ -653,15 +653,17 @@ class IRGenSILFunction :
653
653
}
654
654
655
655
StringRef getOrCreateAnonymousVarName (VarDecl *Decl) {
656
- llvm::SmallString< 4 > &Name = AnonymousVariables[Decl];
656
+ Identifier &Name = AnonymousVariables[Decl];
657
657
if (Name.empty ()) {
658
658
{
659
- llvm::raw_svector_ostream S (Name);
659
+ llvm::SmallString<64 > NameBuffer;
660
+ llvm::raw_svector_ostream S (NameBuffer);
660
661
S << " $_" << NumAnonVars++;
662
+ Name = IGM.Context .getIdentifier (NameBuffer);
661
663
}
662
664
AnonymousVariables.insert ({Decl, Name});
663
665
}
664
- return Name;
666
+ return Name. str () ;
665
667
}
666
668
667
669
template <class DebugVarCarryingInst >
0 commit comments