diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-27 17:29:58 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-27 17:29:58 +0000 |
| commit | 3d2afaa29ea78b6170da9852ce5d57480720d1e0 (patch) | |
| tree | 898d287e9f2cd9a4a0eb3081725093a0b4d2466d /llvm/test/Verifier/llvm.dbg.declare-expression.ll | |
| parent | b4499078d1b5e159d03cf51011ea71027716cfff (diff) | |
| download | bcm5719-llvm-3d2afaa29ea78b6170da9852ce5d57480720d1e0.tar.gz bcm5719-llvm-3d2afaa29ea78b6170da9852ce5d57480720d1e0.zip | |
Verifier: Check fields of MDVariable subclasses
Check fields from `MDLocalVariable` and `MDGlobalVariable` and change
the accessors to downcast to the right types. `getType()` still returns
`Metadata*` since it could be an `MDString`-based reference.
Since local variables require non-null scopes, I also updated `LLParser`
to require a `scope:` field.
A number of testcases had grown bitrot and started failing with this
patch; I committed them separately in r233349. If I just broke your
out-of-tree testcases, you're probably hitting similar problems (so have
a look there).
llvm-svn: 233389
Diffstat (limited to 'llvm/test/Verifier/llvm.dbg.declare-expression.ll')
| -rw-r--r-- | llvm/test/Verifier/llvm.dbg.declare-expression.ll | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/test/Verifier/llvm.dbg.declare-expression.ll b/llvm/test/Verifier/llvm.dbg.declare-expression.ll index 1121e43ee5a..0491fdc95aa 100644 --- a/llvm/test/Verifier/llvm.dbg.declare-expression.ll +++ b/llvm/test/Verifier/llvm.dbg.declare-expression.ll @@ -6,7 +6,7 @@ define void @foo(i32 %a) { entry: %s = alloca i32 - call void @llvm.dbg.declare(metadata i32* %s, metadata !MDLocalVariable(tag: DW_TAG_arg_variable), metadata !"") + call void @llvm.dbg.declare(metadata i32* %s, metadata !MDLocalVariable(tag: DW_TAG_arg_variable, scope: !1), metadata !"") ret void } @@ -14,3 +14,4 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) !llvm.module.flags = !{!0} !0 = !{i32 2, !"Debug Info Version", i32 3} +!1 = !MDSubprogram() |

