Make this print the right start pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28321 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 00b23c1..011b386 100644
--- a/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -815,9 +815,11 @@
}
}
- DEBUG(std::cerr << "JIT: Finished CodeGen of [" << (void*)BufferBegin
+ DEBUG(void *FnStart = TheJIT->getPointerToGlobalIfAvailable(F.getFunction());
+ char *FnEnd = (char*)getCurrentPCOffset();
+ std::cerr << "JIT: Finished CodeGen of [" << FnStart
<< "] Function: " << F.getFunction()->getName()
- << ": " << getCurrentPCOffset() << " bytes of text, "
+ << ": " << (FnEnd-(char*)FnStart) << " bytes of text, "
<< Relocations.size() << " relocations\n");
Relocations.clear();
return false;