Debug Info: Support address space attributes on rvalue references.
authorAdrian Prantl <aprantl@apple.com>
Tue, 7 May 2019 17:42:38 +0000 (17:42 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 7 May 2019 17:42:38 +0000 (17:42 +0000)
commite6e8db5e9bc5720f3ce29c17d334d156bd812947
tree7a0b0f0088a7007c255345e7f43d482718270c02
parentcc63db4ff0f9dfe0b380647ba3f67ba6952d0ee2
Debug Info: Support address space attributes on rvalue references.

DWARF5, 2.12 20ff says that

Any debugging information entry representing a pointer or reference
type [may have a DW_AT_address_class attribute].

The existing code (https://reviews.llvm.org/D29670) seems to take a
quite literal interpretation of that wording. I don't see a reason why
an rvalue reference isn't a reference type in the spirit of that
paragraph. This patch allows rvalue references to also have address
spaces.

rdar://problem/50511483

Differential Revision: https://reviews.llvm.org/D61625

llvm-svn: 360176
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/DebugInfo/Generic/address_space_rvalue.ll [new file with mode: 0644]
llvm/test/Verifier/diderivedtype-address-space-rvalue-reference-type.ll