]> granicus.if.org Git - llvm/commit
Extend the DWARFExpression address handling to support 16-bit addresses
authorDylan McKay <me@dylanmckay.io>
Sat, 1 Jun 2019 09:18:26 +0000 (09:18 +0000)
committerDylan McKay <me@dylanmckay.io>
Sat, 1 Jun 2019 09:18:26 +0000 (09:18 +0000)
commit07558093b87ddfa6feb917bad0bc87675a237b3d
tree92ae5f3ee4058033a19bf488691031f157b6b9ac
parent64894a4df74b45bd4a83fbb402d58977c4a4812c
Extend the DWARFExpression address handling to support 16-bit addresses

This allows the DWARFExpression class to handle addresses without
crashing on targets with 16-bit pointers like AVR.

This is required in order to generate assembly from clang via the '-S'
flag.

This fixes an error with the following message:

clang: llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h:132: llvm::DWARFExpression::DWARFExpression(llvm::DataExtractor, uint16_t, uint8_t):
       Assertion `AddressSize == 8 || AddressSize == 4' failed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362290 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/DWARF/DWARFExpression.h
lib/DebugInfo/DWARF/DWARFExpression.cpp
test/MC/AVR/dwarf-asm-no-code.s [new file with mode: 0644]