diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2016-09-13 01:12:59 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-09-13 01:12:59 +0000 |
| commit | d4135bbc30de3d3dbd44d64d718fb2169f41bae0 (patch) | |
| tree | 0b96e34c50822aed89a2272d9e9f3688bc3a0e46 /llvm/lib/AsmParser/LLParser.cpp | |
| parent | efc066758309683482edd289d82ec7670d38931f (diff) | |
| download | bcm5719-llvm-d4135bbc30de3d3dbd44d64d718fb2169f41bae0.tar.gz bcm5719-llvm-d4135bbc30de3d3dbd44d64d718fb2169f41bae0.zip | |
DebugInfo: New metadata representation for global variables.
This patch reverses the edge from DIGlobalVariable to GlobalVariable.
This will allow us to more easily preserve debug info metadata when
manipulating global variables.
Fixes PR30362. A program for upgrading test cases is attached to that
bug.
Differential Revision: http://reviews.llvm.org/D20147
llvm-svn: 281284
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 5120b949e84..15327a1d065 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -4201,7 +4201,7 @@ bool LLParser::ParseDIGlobalVariable(MDNode *&Result, bool IsDistinct) { OPTIONAL(type, MDField, ); \ OPTIONAL(isLocal, MDBoolField, ); \ OPTIONAL(isDefinition, MDBoolField, (true)); \ - OPTIONAL(variable, MDConstant, ); \ + OPTIONAL(expr, MDField, ); \ OPTIONAL(declaration, MDField, ); PARSE_MD_FIELDS(); #undef VISIT_MD_FIELDS @@ -4209,7 +4209,7 @@ bool LLParser::ParseDIGlobalVariable(MDNode *&Result, bool IsDistinct) { Result = GET_OR_DISTINCT(DIGlobalVariable, (Context, scope.Val, name.Val, linkageName.Val, file.Val, line.Val, type.Val, isLocal.Val, - isDefinition.Val, variable.Val, declaration.Val)); + isDefinition.Val, expr.Val, declaration.Val)); return false; } |

