diff options
author | Adrian Prantl <aprantl@apple.com> | 2017-08-30 18:06:51 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2017-08-30 18:06:51 +0000 |
commit | 69e607f200faf0384a737bd8db69f29e51e1b378 (patch) | |
tree | 2623b1ea8144906eaa3c8707e47d05fdf46b2783 /lib/AsmParser | |
parent | ec6b6f4e7ad864820eb26875edf94f28c466e053 (diff) |
Canonicalize the representation of empty an expression in DIGlobalVariableExpression
This change simplifies code that has to deal with
DIGlobalVariableExpression and mirrors how we treat DIExpressions in
debug info intrinsics. Before this change there were two ways of
representing empty expressions on globals, a nullptr and an empty
!DIExpression().
If someone needs to upgrade out-of-tree testcases:
perl -pi -e 's/(!DIGlobalVariableExpression\(var: ![0-9]*)\)/\1, expr: !DIExpression())/g' <MYTEST.ll>
will catch 95%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index a5f4dd73d30..a1bb8602192 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -4383,7 +4383,7 @@ bool LLParser::ParseDIGlobalVariableExpression(MDNode *&Result, bool IsDistinct) { #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \ REQUIRED(var, MDField, ); \ - OPTIONAL(expr, MDField, ); + REQUIRED(expr, MDField, ); PARSE_MD_FIELDS(); #undef VISIT_MD_FIELDS |