diff options
| -rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index a82b266bbdb..ddc9081d654 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -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) |

