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

llvm-svn: 57484
This commit is contained in:
Nuno Lopes 2008-10-14 10:04:52 +00:00
parent 8fe4eac94c
commit 08a1a82acc

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