1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Print out all globals as they are emitted, not just those emitted from

emitGlobals

llvm-svn: 11191
This commit is contained in:
Chris Lattner 2004-02-08 19:33:23 +00:00
parent ffd16b0190
commit ecaa4c58e2

View File

@ -454,9 +454,6 @@ void ExecutionEngine::emitGlobals() {
// Allocate some memory for it!
unsigned Size = TD.getTypeSize(Ty);
addGlobalMapping(I, new char[Size]);
DEBUG(std::cerr << "Global '" << I->getName() << "' -> "
<< getPointerToGlobal(I) << "\n");
} else {
// External variable reference. Try to use the dynamic loader to
// get a pointer to it.
@ -482,6 +479,8 @@ void ExecutionEngine::emitGlobals() {
// already in the map.
void ExecutionEngine::EmitGlobalVariable(const GlobalVariable *GV) {
void *GA = getPointerToGlobalIfAvailable(GV);
DEBUG(std::cerr << "Global '" << GV->getName() << "' -> " << GA << "\n");
const Type *ElTy = GV->getType()->getElementType();
if (GA == 0) {
// If it's not already specified, allocate memory for the global.