diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-12-22 00:29:00 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-12-22 00:29:00 +0000 |
commit | ee92d2e1b2bfca621f41d49c1bbebac7b7beb40b (patch) | |
tree | 389d81c9103b6b6231e60ae329b6fb1bf751e3f4 /lib/AsmParser | |
parent | 5cfe3c370fffa5140854e98daba99bbab8f3327f (diff) |
[LLParser] Make the line field of DIMacro(File) optional.
Otherwise these records do not survive roundtrips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index d1891b7feb0..d2e2c0d46d3 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -4121,7 +4121,7 @@ bool LLParser::ParseDINamespace(MDNode *&Result, bool IsDistinct) { bool LLParser::ParseDIMacro(MDNode *&Result, bool IsDistinct) { #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ REQUIRED(type, DwarfMacinfoTypeField, ); \ - REQUIRED(line, LineField, ); \ + OPTIONAL(line, LineField, ); \ REQUIRED(name, MDStringField, ); \ OPTIONAL(value, MDStringField, ); PARSE_MD_FIELDS(); @@ -4137,7 +4137,7 @@ bool LLParser::ParseDIMacro(MDNode *&Result, bool IsDistinct) { bool LLParser::ParseDIMacroFile(MDNode *&Result, bool IsDistinct) { #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ OPTIONAL(type, DwarfMacinfoTypeField, (dwarf::DW_MACINFO_start_file)); \ - REQUIRED(line, LineField, ); \ + OPTIONAL(line, LineField, ); \ REQUIRED(file, MDField, ); \ OPTIONAL(nodes, MDField, ); PARSE_MD_FIELDS(); |