[MCJIT] Don't crash in debugging output for sections that aren't emitted.

llvm-svn: 218836
This commit is contained in:
Lang Hames 2014-10-01 21:57:47 +00:00
parent da0fd6d3ad
commit 24f0c24de9
1 changed files with 5 additions and 0 deletions

View File

@ -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;