summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5ccac24)
raw | patch | inline | side by side (parent: 5ccac24)
author | Victor Hernandez <vhernandez@apple.com> | |
Fri, 13 Nov 2009 01:44:55 +0000 (01:44 +0000) | ||
committer | Victor Hernandez <vhernandez@apple.com> | |
Fri, 13 Nov 2009 01:44:55 +0000 (01:44 +0000) |
include/llvm/Analysis/DebugInfo.h | patch | blob | history | |
lib/Analysis/DebugInfo.cpp | patch | blob | history |
index b10a545b0aefdf708cffff8889f0289e13bc9da6..f741416f26590ed3e16ddaf38ed8ec31b7ec146e 100644 (file)
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
index 1b58b5ed57f370366260b72157ea2a161a053081..047837c2fb2fdf5d673cc78704da6e23a75344c1 100644 (file)
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 &&
/// 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);
/// 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);