little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nuno Lopes 2008-10-14 10:04:52 +00:00
parent 9ba2379906
commit c8ed902298

View File

@ -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);
}
}