diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-12-03 15:10:23 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-12-03 15:10:23 +0000 |
commit | 1cd1444449cb68e2091e8f36785403288ebd3326 (patch) | |
tree | a4cca876cfed14647a1e99547d09390f437db451 /llvm/lib/CodeGen/AsmPrinter/DIE.cpp | |
parent | a6d47ae71cf70c2b16eba662be74902b31b0f13d (diff) | |
download | bcm5719-llvm-1cd1444449cb68e2091e8f36785403288ebd3326.tar.gz bcm5719-llvm-1cd1444449cb68e2091e8f36785403288ebd3326.zip |
Reland 196270 "Generalize debug info / EH emission in AsmPrinter"
Addressing the existense AMDGPUAsmPrinter and other subclasses of AsmPrinter
llvm-svn: 196288
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); } |