diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 3b041b088f2..12e4f4ed056 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -1063,6 +1063,8 @@ void Verifier::visitDILocalVariable(const DILocalVariable &N) { "invalid tag", &N); Assert(N.getRawScope() && isa<DILocalScope>(N.getRawScope()), "local variable requires a valid scope", &N, N.getRawScope()); + Assert(bool(N.getArg()) == (N.getTag() == dwarf::DW_TAG_arg_variable), + "local variable should have arg iff it's a DW_TAG_arg_variable", &N); } void Verifier::visitDIExpression(const DIExpression &N) { |