mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Add SetLocation() to allow IRBuilder user to set location info for an instruction already created.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82570 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
14433c96c6
commit
7815d71167
@ -131,8 +131,8 @@ public:
|
||||
InsertPt = IP;
|
||||
}
|
||||
|
||||
/// SetCurrentLocation - This specifies the location information used
|
||||
/// by debugging information.
|
||||
/// SetCurrentLocation - Set location information used by debugging
|
||||
/// information.
|
||||
void SetCurrentLocation(MDNode *L) {
|
||||
if (MDKind == 0)
|
||||
MDKind = Context.getMetadata().getMDKind("dbg");
|
||||
@ -142,7 +142,13 @@ public:
|
||||
}
|
||||
|
||||
MDNode *getCurrentLocation() const { return CurLocation; }
|
||||
|
||||
|
||||
/// SetLocation - Set location information for the given instruction.
|
||||
void SetLocation(Instruction *I) {
|
||||
if (CurLocation)
|
||||
Context.getMetadata().setMD(MDKind, CurLocation, I);
|
||||
}
|
||||
|
||||
/// Insert - Insert and return the specified instruction.
|
||||
template<typename InstTy>
|
||||
InstTy *Insert(InstTy *I, const Twine &Name = "") const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user