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 | 44b3c3ef7154bcc1a0637b1cf253d14864e96cc3 (patch) | |
| tree | 779849fad3cf3805ead50fffb1667369de7c5c2d | |
| parent | 76af158707679cc7764fa8b91f1924a0f3976114 (diff) | |
| download | external_llvm-44b3c3ef7154bcc1a0637b1cf253d14864e96cc3.zip external_llvm-44b3c3ef7154bcc1a0637b1cf253d14864e96cc3.tar.gz external_llvm-44b3c3ef7154bcc1a0637b1cf253d14864e96cc3.tar.bz2 | |
Remove unnecessary llvm.dbg.declare bitcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87059 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | include/llvm/Analysis/DebugInfo.h | 1 | ||||
| -rw-r--r-- | lib/Analysis/DebugInfo.cpp | 14 |
2 files changed, 3 insertions, 12 deletions
diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index b10a545..f741416 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -467,7 +467,6 @@ namespace llvm { LLVMContext& VMContext; // Cached values for uniquing and faster lookups. - const Type *EmptyStructPtr; // "{}*". Function *StopPointFn; // llvm.dbg.stoppoint Function *FuncStartFn; // llvm.dbg.func.start Function *RegionStartFn; // llvm.dbg.region.start diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 1b58b5e..047837c 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/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); |
