mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Expand api out in the usual inserter way, though, I do have a
question, can we get rid of the BasicBlock versions of all inserters and use Head == 0 to indicate the old case when GetInsertBlock == 0? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83216 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
471850ab84
commit
e4250396ea
@ -592,7 +592,12 @@ namespace llvm {
|
||||
void InsertRegionEnd(DIDescriptor D, BasicBlock *BB);
|
||||
|
||||
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
|
||||
void InsertDeclare(llvm::Value *Storage, DIVariable D, BasicBlock *BB);
|
||||
void InsertDeclare(llvm::Value *Storage, DIVariable D,
|
||||
BasicBlock *InsertAtEnd);
|
||||
|
||||
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
|
||||
void InsertDeclare(llvm::Value *Storage, DIVariable D,
|
||||
Instruction *InsertBefore);
|
||||
|
||||
private:
|
||||
Constant *GetTagConstant(unsigned TAG);
|
||||
|
@ -933,15 +933,29 @@ void DIFactory::InsertRegionEnd(DIDescriptor D, BasicBlock *BB) {
|
||||
}
|
||||
|
||||
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
|
||||
void DIFactory::InsertDeclare(Value *Storage, DIVariable D, BasicBlock *BB) {
|
||||
void 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, "", BB);
|
||||
Storage = new BitCastInst(Storage, EmptyStructPtr, "", InsertBefore);
|
||||
|
||||
if (!DeclareFn)
|
||||
DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare);
|
||||
|
||||
Value *Args[] = { Storage, D.getNode() };
|
||||
CallInst::Create(DeclareFn, Args, Args+2, "", BB);
|
||||
CallInst::Create(DeclareFn, Args, Args+2, "", InsertBefore);
|
||||
}
|
||||
|
||||
/// InsertDeclare - Insert a new llvm.dbg.declare intrinsic call.
|
||||
void 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);
|
||||
|
||||
if (!DeclareFn)
|
||||
DeclareFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_declare);
|
||||
|
||||
Value *Args[] = { Storage, D.getNode() };
|
||||
CallInst::Create(DeclareFn, Args, Args+2, "", InsertAtEnd);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user