diff options
| author | Victor Hernandez <vhernandez@apple.com> | 2009-11-13 01:44:55 +0000 |
|---|---|---|
| committer | Victor Hernandez <vhernandez@apple.com> | 2009-11-13 01:44:55 +0000 |
| commit | 41e7648e09e3a4ebf97b3a48222f02f4a63f8afd (patch) | |
| tree | f37ede484f999f4912ac39d8e68a93ec5f8a68fb /llvm/lib | |
| parent | d554e4409278791a30906b5de18c7f539d816c9c (diff) | |
| download | bcm5719-llvm-41e7648e09e3a4ebf97b3a48222f02f4a63f8afd.tar.gz bcm5719-llvm-41e7648e09e3a4ebf97b3a48222f02f4a63f8afd.zip | |
Remove unnecessary llvm.dbg.declare bitcast
llvm-svn: 87059
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 1b58b5ed57f..047837c2fb2 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -608,9 +608,7 @@ void DIVariable::dump() const { DIFactory::DIFactory(Module &m) : M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0), RegionStartFn(0), RegionEndFn(0), - DeclareFn(0) { - EmptyStructPtr = PointerType::getUnqual(StructType::get(VMContext)); -} + DeclareFn(0) {} Constant *DIFactory::GetTagConstant(unsigned TAG) { assert((TAG & LLVMDebugVersionMask) == 0 && @@ -1037,10 +1035,7 @@ void DIFactory::InsertRegionEnd(DIDescriptor D, BasicBlock *BB) { /// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call. Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D, - Instruction *InsertBefore) { - // Cast the storage to a {}* for the call to llvm.dbg.declare. - Storage = new BitCastInst(Storage, EmptyStructPtr, "", InsertBefore); - + Instruction *InsertBefore) { if (!DeclareFn) DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare); @@ -1050,10 +1045,7 @@ Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D, /// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call. Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D, - BasicBlock *InsertAtEnd) { - // Cast the storage to a {}* for the call to llvm.dbg.declare. - Storage = new BitCastInst(Storage, EmptyStructPtr, "", InsertAtEnd); - + BasicBlock *InsertAtEnd) { if (!DeclareFn) DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare); |

