mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
If weak GlobalVariable was bitcast'ed to different type during linking
we will need to strip all casts for intializer lookup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50776 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b04adddd50
commit
149a315369
@ -758,7 +758,7 @@ static bool LinkGlobalInits(Module *Dest, const Module *Src,
|
||||
Constant *SInit =
|
||||
cast<Constant>(RemapOperand(SGV->getInitializer(), ValueMap));
|
||||
|
||||
GlobalVariable *DGV = cast<GlobalVariable>(ValueMap[SGV]);
|
||||
GlobalVariable *DGV = cast<GlobalVariable>(StripPointerCasts(ValueMap[SGV]));
|
||||
if (DGV->hasInitializer()) {
|
||||
if (SGV->hasExternalLinkage()) {
|
||||
if (DGV->getInitializer() != SInit)
|
||||
|
Loading…
Reference in New Issue
Block a user