mirror of
https://github.com/RPCS3/llvm.git
synced 2026-01-31 01:25:19 +01:00
[DebugInfo] Emit address space with DW_AT_address_class attribute for pointer and reference types
Differential Revision: https://reviews.llvm.org/D29670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297320 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1473,6 +1473,13 @@ void ModuleBitcodeWriter::writeDIDerivedType(const DIDerivedType *N,
|
||||
Record.push_back(N->getFlags());
|
||||
Record.push_back(VE.getMetadataOrNullID(N->getExtraData()));
|
||||
|
||||
// DWARF address space is encoded as N->getDWARFAddressSpace() + 1. 0 means
|
||||
// that there is no DWARF address space associated with DIDerivedType.
|
||||
if (const auto &DWARFAddressSpace = N->getDWARFAddressSpace())
|
||||
Record.push_back(*DWARFAddressSpace + 1);
|
||||
else
|
||||
Record.push_back(0);
|
||||
|
||||
Stream.EmitRecord(bitc::METADATA_DERIVED_TYPE, Record, Abbrev);
|
||||
Record.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user