Skip to content

Commit 71bb9a9

Browse files
committed
Remove workaround for unnamed_addr constants for LLVM JIT
The JIT has been fixed in llvm r362139. rdar://51809210
1 parent a6168a9 commit 71bb9a9

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/IRGen/GenDecl.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2590,20 +2590,15 @@ static llvm::GlobalVariable *createGOTEquivalent(IRGenModule &IGM,
25902590
global,
25912591
llvm::Twine("got.") + globalName);
25922592

2593-
// rdar://problem/50968433: Unnamed_addr constants appear to get emitted
2594-
// with incorrect alignment by the LLVM JIT in some cases. Don't use
2595-
// unnamed_addr as a workaround.
25962593
// rdar://problem/53836960: i386 ld64 also mis-links relative references
25972594
// to GOT entries.
2598-
if (!IGM.getOptions().UseJIT
2599-
&& (!IGM.Triple.isOSDarwin()
2600-
|| IGM.Triple.getArch() != llvm::Triple::x86)) {
2595+
if (!IGM.Triple.isOSDarwin() || IGM.Triple.getArch() != llvm::Triple::x86) {
26012596
gotEquivalent->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
26022597
} else {
26032598
ApplyIRLinkage(IRLinkage::InternalLinkOnceODR)
26042599
.to(gotEquivalent);
26052600
}
2606-
2601+
26072602
return gotEquivalent;
26082603
}
26092604

0 commit comments

Comments
 (0)