diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-12-03 12:05:18 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-12-03 12:05:18 +0000 |
commit | 4c719cf6c65f88af719f7e3582afd5ced4c5561f (patch) | |
tree | a6f830ee6949f5f165d6b533c29f1de3aa96dac9 /llvm/lib/CodeGen/AsmPrinter/DIE.cpp | |
parent | 8a25992f39b0001c980388d26cbfccb1e86e89d8 (diff) | |
download | bcm5719-llvm-4c719cf6c65f88af719f7e3582afd5ced4c5561f.tar.gz bcm5719-llvm-4c719cf6c65f88af719f7e3582afd5ced4c5561f.zip |
Generalize debug info / EH emission in AsmPrinter
llvm-svn: 196270
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp index 8a7b8608b71..264d89152cf 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp @@ -390,7 +390,9 @@ unsigned DIEEntry::getRefAddrSize(AsmPrinter *AP) { // specified to be four bytes in the DWARF 32-bit format and eight bytes // in the DWARF 64-bit format, while DWARF Version 2 specifies that such // references have the same size as an address on the target system. - if (AP->getDwarfDebug()->getDwarfVersion() == 2) + const DwarfDebug *DD = AP->getDwarfDebug(); + assert(DD && "Expected Dwarf Debug info to be available"); + if (DD->getDwarfVersion() == 2) return AP->getDataLayout().getPointerSize(); return sizeof(int32_t); } |