diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index acc89c9e8583..55151cb1d5ac 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -963,7 +963,7 @@ void ExecutionEngine::emitGlobals() { LinkedGlobalsMap[std::make_pair(GV->getName(), GV->getType())]; void *Ptr = getPointerToGlobalIfAvailable(CGV); assert(Ptr && "Canonical global wasn't codegen'd!"); - addGlobalMapping(GV, getPointerToGlobalIfAvailable(CGV)); + addGlobalMapping(GV, Ptr); } }