diff options
author | Victor Hernandez <vhernandez@apple.com> | 2010-01-15 03:37:48 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2010-01-15 03:37:48 +0000 |
commit | 283ba2fbb4a40d5f7615aba070f2f7ec161d19ac (patch) | |
tree | 2b50ef9973091db7646a7325a75f13c791a5b003 /lib/VMCore | |
parent | 8396a17bc3a6d2cb9aedd22fc15780ac8ab41662 (diff) |
Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93504 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 66e2a67025..ec475e4729 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -1590,9 +1590,10 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { default: break; case Intrinsic::dbg_declare: // llvm.dbg.declare - if (Constant *C = dyn_cast<Constant>(CI.getOperand(1))) - Assert1(C && !isa<ConstantPointerNull>(C), - "invalid llvm.dbg.declare intrinsic call", &CI); + if (MDNode *MD = dyn_cast<MDNode>(CI.getOperand(1))) + if (Constant *C = dyn_cast<Constant>(MD->getOperand(0))) + Assert1(C && !isa<ConstantPointerNull>(C), + "invalid llvm.dbg.declare intrinsic call", &CI); break; case Intrinsic::memcpy: case Intrinsic::memmove: |