diff options
author | Adrian Prantl <aprantl@apple.com> | 2022-01-19 15:33:59 -0800 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2022-01-19 15:33:59 -0800 |
commit | 24bc072edb5b157dd3ee3a7f17214ff831ea2b5c (patch) | |
tree | a4fbaf31b5d8da601a78209ce4c91af7aa6dc7e3 /llvm/lib/IR/DIBuilder.cpp | |
parent | c7b71acef2685ca59830b5b59c6214b6dac474a2 (diff) | |
download | llvm-24bc072edb5b157dd3ee3a7f17214ff831ea2b5c.zip llvm-24bc072edb5b157dd3ee3a7f17214ff831ea2b5c.tar.gz llvm-24bc072edb5b157dd3ee3a7f17214ff831ea2b5c.tar.bz2 |
Fix modules build by moving implementation into .cpp file
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index 5712f4e..a6e84df 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -1013,6 +1013,24 @@ static Function *getDeclareIntrin(Module &M) { : Intrinsic::dbg_declare); } +Instruction *DIBuilder::insertDbgValueIntrinsic( + llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr, + const DILocation *DL, BasicBlock *InsertBB, Instruction *InsertBefore) { + if (!ValueFn) + ValueFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_value); + return insertDbgIntrinsic(ValueFn, Val, VarInfo, Expr, DL, InsertBB, + InsertBefore); +} + +Instruction *DIBuilder::insertDbgAddrIntrinsic( + llvm::Value *Val, DILocalVariable *VarInfo, DIExpression *Expr, + const DILocation *DL, BasicBlock *InsertBB, Instruction *InsertBefore) { + if (!AddrFn) + AddrFn = Intrinsic::getDeclaration(&M, Intrinsic::dbg_addr); + return insertDbgIntrinsic(AddrFn, Val, VarInfo, Expr, DL, InsertBB, + InsertBefore); +} + Instruction *DIBuilder::insertDeclare(Value *Storage, DILocalVariable *VarInfo, DIExpression *Expr, const DILocation *DL, BasicBlock *InsertBB, |