diff options
author | Manman Ren <mren@apple.com> | 2013-06-29 05:01:19 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-06-29 05:01:19 +0000 |
commit | da91817d40dad85a15e0f2a7e11d4d302949586b (patch) | |
tree | bb232859e02a59b491005bc1143d0b98779cca6c /lib/IR/DIBuilder.cpp | |
parent | d1fe8d5212fbcb12dd592239f76f95ff2db7870d (diff) | |
download | llvm-da91817d40dad85a15e0f2a7e11d4d302949586b.tar.gz llvm-da91817d40dad85a15e0f2a7e11d4d302949586b.tar.bz2 llvm-da91817d40dad85a15e0f2a7e11d4d302949586b.tar.xz |
Debug Info: clean up usage of Verify.
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DIBuilder.cpp')
-rw-r--r-- | lib/IR/DIBuilder.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp index e30dcdca32..ab61b88ef8 100644 --- a/lib/IR/DIBuilder.cpp +++ b/lib/IR/DIBuilder.cpp @@ -1153,7 +1153,8 @@ DILexicalBlock DIBuilder::createLexicalBlock(DIDescriptor Scope, DIFile File, Instruction *DIBuilder::insertDeclare(Value *Storage, DIVariable VarInfo, Instruction *InsertBefore) { assert(Storage && "no storage passed to dbg.declare"); - assert(VarInfo.Verify() && "empty DIVariable passed to dbg.declare"); + assert(VarInfo.isVariable() && + "empty or invalid DIVariable passed to dbg.declare"); if (!DeclareFn) DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare); @@ -1165,7 +1166,8 @@ Instruction *DIBuilder::insertDeclare(Value *Storage, DIVariable VarInfo, Instruction *DIBuilder::insertDeclare(Value *Storage, DIVariable VarInfo, BasicBlock *InsertAtEnd) { assert(Storage && "no storage passed to dbg.declare"); - assert(VarInfo.Verify() && "invalid DIVariable passed to dbg.declare"); + assert(VarInfo.isVariable() && + "empty or invalid DIVariable passed to dbg.declare"); if (!DeclareFn) DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare); @@ -1184,7 +1186,8 @@ Instruction *DIBuilder::insertDbgValueIntrinsic(Value *V, uint64_t Offset, DIVariable VarInfo, Instruction *InsertBefore) { assert(V && "no value passed to dbg.value"); - assert(VarInfo.Verify() && "invalid DIVariable passed to dbg.value"); + assert(VarInfo.isVariable() && + "empty or invalid DIVariable passed to dbg.value"); if (!ValueFn) ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value); @@ -1199,7 +1202,8 @@ Instruction *DIBuilder::insertDbgValueIntrinsic(Value *V, uint64_t Offset, DIVariable VarInfo, BasicBlock *InsertAtEnd) { assert(V && "no value passed to dbg.value"); - assert(VarInfo.Verify() && "invalid DIVariable passed to dbg.value"); + assert(VarInfo.isVariable() && + "empty or invalid DIVariable passed to dbg.value"); if (!ValueFn) ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value); |