X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FVerifier.cpp;h=12e4f4ed0565ac15f0ad4a74f07c31683344e60c;hb=cbfbb3ee4c9b215cd367db3b64dfef0a7f334369;hp=3b041b088f2d5ce872a2c379206a6cd0a55f34b8;hpb=3a8b87d9ce0356bb565a26b39838c9e1a7292a1c;p=oota-llvm.git diff --git a/lib/IR/Verifier.cpp b/lib/IR/Verifier.cpp index 3b041b088f2..12e4f4ed056 100644 --- a/lib/IR/Verifier.cpp +++ b/lib/IR/Verifier.cpp @@ -1063,6 +1063,8 @@ void Verifier::visitDILocalVariable(const DILocalVariable &N) { "invalid tag", &N); Assert(N.getRawScope() && isa(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) {