summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-08 19:33:23 +0000
committerChris Lattner <sabre@nondot.org>2004-02-08 19:33:23 +0000
commitdc631735e6d1b72c9fa58c15e9eb536a88a8cb9c (patch)
treeda98e57d727735fa4c9dd20fb71afc1f380fd807 /llvm/lib
parent6604615a16be6c9eefee5e1973425a8c864e6897 (diff)
downloadbcm5719-llvm-dc631735e6d1b72c9fa58c15e9eb536a88a8cb9c.tar.gz
bcm5719-llvm-dc631735e6d1b72c9fa58c15e9eb536a88a8cb9c.zip
Print out all globals as they are emitted, not just those emitted from
emitGlobals llvm-svn: 11191
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 5892d169e78..665b5c62737 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -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.
OpenPOWER on IntegriCloud