[llvm-commits] [llvm] r87059 - in /llvm/trunk: include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp
Victor Hernandez
vhernandez at apple.com
Thu Nov 12 17:44:55 PST 2009
Author: hernande
Date: Thu Nov 12 19:44:55 2009
New Revision: 87059
URL: http://llvm.org/viewvc/llvm-project?rev=87059&view=rev
Log:
Remove unnecessary llvm.dbg.declare bitcast
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/Analysis/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=87059&r1=87058&r2=87059&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Thu Nov 12 19:44:55 2009
@@ -467,7 +467,6 @@
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
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=87059&r1=87058&r2=87059&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Thu Nov 12 19:44:55 2009
@@ -608,9 +608,7 @@
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 @@
/// 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 @@
/// 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);
More information about the llvm-commits
mailing list