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 6e9c3cbe30
commit a67f06b9c7
1 changed files with 1 additions and 1 deletions

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