mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
Add SetDebugLocation() variant to
add debug info location to an instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86859 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
77e4751011
commit
4a8efb0c39
@ -151,6 +151,15 @@ public:
|
||||
Context.getMetadata().addMD(MDKind, CurDbgLocation, I);
|
||||
}
|
||||
|
||||
/// SetDebugLocation - Set location information for the given instruction.
|
||||
void SetDebugLocation(Instruction *I, MDNode *Loc) {
|
||||
if (MDKind == 0)
|
||||
MDKind = Context.getMetadata().getMDKind("dbg");
|
||||
if (MDKind == 0)
|
||||
MDKind = Context.getMetadata().registerMDKind("dbg");
|
||||
Context.getMetadata().addMD(MDKind, Loc, I);
|
||||
}
|
||||
|
||||
/// Insert - Insert and return the specified instruction.
|
||||
template<typename InstTy>
|
||||
InstTy *Insert(InstTy *I, const Twine &Name = "") const {
|
||||
|
Loading…
Reference in New Issue
Block a user