[llvm] r218836 - [MCJIT] Don't crash in debugging output for sections that aren't emitted.
Lang Hames
lhames at gmail.com
Wed Oct 1 14:57:48 PDT 2014
Author: lhames
Date: Wed Oct 1 16:57:47 2014
New Revision: 218836
URL: http://llvm.org/viewvc/llvm-project?rev=218836&view=rev
Log:
[MCJIT] Don't crash in debugging output for sections that aren't emitted.
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=218836&r1=218835&r2=218836&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Wed Oct 1 16:57:47 2014
@@ -45,6 +45,11 @@ void RuntimeDyldImpl::deregisterEHFrames
static void dumpSectionMemory(const SectionEntry &S, StringRef State) {
dbgs() << "----- Contents of section " << S.Name << " " << State << " -----";
+ if (S.Address == nullptr) {
+ dbgs() << "\n <section not emitted>\n";
+ return;
+ }
+
const unsigned ColsPerRow = 16;
uint8_t *DataAddr = S.Address;
More information about the llvm-commits
mailing list