Skip to content

Commit 20ee9be

Browse files
Axel-Naumannvgvassilev
authored andcommitted
[clang] Reinstate also decls with internal linkage as deferred:
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.
1 parent 587f7eb commit 20ee9be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interpreter/llvm/src/tools/clang/lib/CodeGen/CodeGenModule.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ class CodeGenModule : public CodeGenTypeCache {
361361
= IsAFunction ? getFunctionLinkage(GD) :
362362
getLLVMLinkageVarDefinition(VD, isTypeConstant(VD->getType(),
363363
ExcludeCtor));
364-
if (llvm::GlobalValue::isLinkOnceLinkage(L)
365-
|| llvm::GlobalValue::isWeakLinkage(L)) {
364+
if (llvm::GlobalValue::isWeakForLinker(L)
365+
|| llvm::GlobalValue::isInternalLinkage(L)) {
366366
if (MangledName.empty())
367367
MangledName = getMangledName(GD);
368368
EmittedDeferredDecls[MangledName] = GD;

0 commit comments

Comments
 (0)