summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-03-08 23:55:44 +0000
committerKonstantin Zhuravlyov <kzhuravl_dev@outlook.com>2017-03-08 23:55:44 +0000
commitd5561e0a0bbd484da17d3b68ae5fedc0a057246b (patch)
tree40642d65e0adf50eae29e4cb204584c0de1a633c /llvm/lib/AsmParser
parentd4cb9c6da0b940e0b13c1c5a286cc67d31267d70 (diff)
downloadbcm5719-llvm-d5561e0a0bbd484da17d3b68ae5fedc0a057246b.tar.gz
bcm5719-llvm-d5561e0a0bbd484da17d3b68ae5fedc0a057246b.zip
[DebugInfo] Emit address space with DW_AT_address_class attribute for pointer and reference types
Differential Revision: https://reviews.llvm.org/D29670 llvm-svn: 297320
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index f026d083863..b9415a26590 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -3908,7 +3908,8 @@ bool LLParser::ParseDIBasicType(MDNode *&Result, bool IsDistinct) {
/// ParseDIDerivedType:
/// ::= !DIDerivedType(tag: DW_TAG_pointer_type, name: "int", file: !0,
/// line: 7, scope: !1, baseType: !2, size: 32,
-/// align: 32, offset: 0, flags: 0, extraData: !3)
+/// align: 32, offset: 0, flags: 0, extraData: !3,
+/// dwarfAddressSpace: 3)
bool LLParser::ParseDIDerivedType(MDNode *&Result, bool IsDistinct) {
#define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
REQUIRED(tag, DwarfTagField, ); \
@@ -3921,14 +3922,20 @@ bool LLParser::ParseDIDerivedType(MDNode *&Result, bool IsDistinct) {
OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
OPTIONAL(offset, MDUnsignedField, (0, UINT64_MAX)); \
OPTIONAL(flags, DIFlagField, ); \
- OPTIONAL(extraData, MDField, );
+ OPTIONAL(extraData, MDField, ); \
+ OPTIONAL(dwarfAddressSpace, MDUnsignedField, (UINT32_MAX, UINT32_MAX));
PARSE_MD_FIELDS();
#undef VISIT_MD_FIELDS
+ Optional<unsigned> DWARFAddressSpace;
+ if (dwarfAddressSpace.Val != UINT32_MAX)
+ DWARFAddressSpace = dwarfAddressSpace.Val;
+
Result = GET_OR_DISTINCT(DIDerivedType,
(Context, tag.Val, name.Val, file.Val, line.Val,
scope.Val, baseType.Val, size.Val, align.Val,
- offset.Val, flags.Val, extraData.Val));
+ offset.Val, DWARFAddressSpace, flags.Val,
+ extraData.Val));
return false;
}
OpenPOWER on IntegriCloud