File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,8 @@ static SILInstruction *findOnlyApply(SILFunction *F) {
93
93
// /
94
94
// / TODO: we should teach the demangler to understand this suffix.
95
95
static std::string getUniqueName (std::string Name, SILModule &M) {
96
- if (!M.lookUpFunction (Name))
96
+ if (!M.lookUpFunction (Name) &&
97
+ !M.findFunction (Name, SILLinkage::PublicExternal))
97
98
return Name;
98
99
return getUniqueName (Name + " _unique_suffix" , M);
99
100
}
@@ -372,7 +373,8 @@ std::string FunctionSignatureTransform::createOptimizedSILFunctionName() {
372
373
do {
373
374
New = NewFM.mangle (UniqueID);
374
375
++UniqueID;
375
- } while (M.lookUpFunction (New));
376
+ } while (M.lookUpFunction (New) ||
377
+ M.findFunction (New, SILLinkage::PublicExternal));
376
378
377
379
return NewMangling::selectMangling (Old, New);
378
380
}
You can’t perform that action at this time.
0 commit comments