diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -1145,6 +1145,7 @@ // non-integrated assemblers don't recognize .cgprofile section. PTO.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS; PTO.Coroutines = LangOpts.Coroutines; + PTO.UniqueLinkageNames = CodeGenOpts.UniqueInternalLinkageNames; PassInstrumentationCallbacks PIC; StandardInstrumentations SI(CodeGenOpts.DebugPassManager); @@ -1326,11 +1327,6 @@ MPM = PB.buildPerModuleDefaultPipeline(Level); } - // Add UniqueInternalLinkageNames Pass which renames internal linkage - // symbols with unique names. - if (CodeGenOpts.UniqueInternalLinkageNames) - MPM.addPass(UniqueInternalLinkageNamesPass()); - if (!CodeGenOpts.MemoryProfileOutput.empty()) { MPM.addPass(createModuleToFunctionPassAdaptor(MemProfilerPass())); MPM.addPass(ModuleMemProfilerPass());