mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Reland 196270 "Generalize debug info / EH emission in AsmPrinter"
Addressing the existense AMDGPUAsmPrinter and other subclasses of AsmPrinter git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user