Skip to content

Commit

Permalink
[clang] Reinstate also decls with internal linkage as deferred:
Browse files Browse the repository at this point in the history
on macOS11, stressInterpreter fails with not re-emitting _ZL6strstrUa9enable_ifILb1EEPKcS0_.
It has internal linkage: originally deferred, it needs a chance to be re-emitted.
Simplify this to include anything that was deferred and is either weak-for-linker or
internal, to hopefully match all cases.
  • Loading branch information
Axel-Naumann authored and vgvassilev committed Dec 9, 2022
1 parent 5cc91ca commit 7e078f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interpreter/llvm/src/tools/clang/lib/CodeGen/CodeGenModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ class CodeGenModule : public CodeGenTypeCache {
= IsAFunction ? getFunctionLinkage(GD) :
getLLVMLinkageVarDefinition(VD, isTypeConstant(VD->getType(),
ExcludeCtor));
if (llvm::GlobalValue::isLinkOnceLinkage(L)
|| llvm::GlobalValue::isWeakLinkage(L)) {
if (llvm::GlobalValue::isWeakForLinker(L)
|| llvm::GlobalValue::isInternalLinkage(L)) {
if (MangledName.empty())
MangledName = getMangledName(GD);
EmittedDeferredDecls[MangledName] = GD;
Expand Down

0 comments on commit 7e078f2

Please sign in to comment.