Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89156 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2009-11-17 22:39:08 +00:00
parent 88b5aca20a
commit 427ef4e35f
2 changed files with 1 additions and 79 deletions

View File

@ -468,15 +468,8 @@ namespace llvm {
Module &M;
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
Function *RegionEndFn; // llvm.dbg.region.end
Function *DeclareFn; // llvm.dbg.declare
StringMap<Constant*> StringCache;
DenseMap<Constant*, DIDescriptor> SimpleConstantCache;
DIFactory(const DIFactory &); // DO NOT IMPLEMENT
void operator=(const DIFactory&); // DO NOT IMPLEMENT
@ -605,23 +598,6 @@ namespace llvm {
DILocation CreateLocation(unsigned LineNo, unsigned ColumnNo,
DIScope S, DILocation OrigLoc);
/// InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation,
/// inserting it at the end of the specified basic block.
void InsertStopPoint(DICompileUnit CU, unsigned LineNo, unsigned ColNo,
BasicBlock *BB);
/// InsertSubprogramStart - Create a new llvm.dbg.func.start intrinsic to
/// mark the start of the specified subprogram.
void InsertSubprogramStart(DISubprogram SP, BasicBlock *BB);
/// InsertRegionStart - Insert a new llvm.dbg.region.start intrinsic call to
/// mark the start of a region for the specified scoping descriptor.
void InsertRegionStart(DIDescriptor D, BasicBlock *BB);
/// InsertRegionEnd - Insert a new llvm.dbg.region.end intrinsic call to
/// mark the end of a region for the specified scoping descriptor.
void InsertRegionEnd(DIDescriptor D, BasicBlock *BB);
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
Instruction *InsertDeclare(llvm::Value *Storage, DIVariable D,
BasicBlock *InsertAtEnd);

View File

@ -606,9 +606,7 @@ void DIVariable::dump() const {
//===----------------------------------------------------------------------===//
DIFactory::DIFactory(Module &m)
: M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0),
RegionStartFn(0), RegionEndFn(0),
DeclareFn(0) {
: M(m), VMContext(M.getContext()), DeclareFn(0) {
EmptyStructPtr = PointerType::getUnqual(StructType::get(VMContext));
}
@ -983,58 +981,6 @@ DILocation DIFactory::CreateLocation(unsigned LineNo, unsigned ColumnNo,
// DIFactory: Routines for inserting code into a function
//===----------------------------------------------------------------------===//
/// InsertStopPoint - Create a new llvm.dbg.stoppoint intrinsic invocation,
/// inserting it at the end of the specified basic block.
void DIFactory::InsertStopPoint(DICompileUnit CU, unsigned LineNo,
unsigned ColNo, BasicBlock *BB) {
// Lazily construct llvm.dbg.stoppoint function.
if (!StopPointFn)
StopPointFn = llvm::Intrinsic::getDeclaration(&M,
llvm::Intrinsic::dbg_stoppoint);
// Invoke llvm.dbg.stoppoint
Value *Args[] = {
ConstantInt::get(llvm::Type::getInt32Ty(VMContext), LineNo),
ConstantInt::get(llvm::Type::getInt32Ty(VMContext), ColNo),
CU.getNode()
};
CallInst::Create(StopPointFn, Args, Args+3, "", BB);
}
/// InsertSubprogramStart - Create a new llvm.dbg.func.start intrinsic to
/// mark the start of the specified subprogram.
void DIFactory::InsertSubprogramStart(DISubprogram SP, BasicBlock *BB) {
// Lazily construct llvm.dbg.func.start.
if (!FuncStartFn)
FuncStartFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_func_start);
// Call llvm.dbg.func.start which also implicitly sets a stoppoint.
CallInst::Create(FuncStartFn, SP.getNode(), "", BB);
}
/// InsertRegionStart - Insert a new llvm.dbg.region.start intrinsic call to
/// mark the start of a region for the specified scoping descriptor.
void DIFactory::InsertRegionStart(DIDescriptor D, BasicBlock *BB) {
// Lazily construct llvm.dbg.region.start function.
if (!RegionStartFn)
RegionStartFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_region_start);
// Call llvm.dbg.func.start.
CallInst::Create(RegionStartFn, D.getNode(), "", BB);
}
/// InsertRegionEnd - Insert a new llvm.dbg.region.end intrinsic call to
/// mark the end of a region for the specified scoping descriptor.
void DIFactory::InsertRegionEnd(DIDescriptor D, BasicBlock *BB) {
// Lazily construct llvm.dbg.region.end function.
if (!RegionEndFn)
RegionEndFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_region_end);
// Call llvm.dbg.region.end.
CallInst::Create(RegionEndFn, D.getNode(), "", BB);
}
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
Instruction *DIFactory::InsertDeclare(Value *Storage, DIVariable D,
Instruction *InsertBefore) {