[GlobalISel] Ensure MachineIRBuilder::getDebugLoc() returns a const reference. NFCI.

Avoids a lot of unnecessary tracking increments/decrements of the underlying TrackingMDNodeRef.
This commit is contained in:
Simon Pilgrim 2021-05-08 16:22:46 +01:00
parent 4524d8b755
commit ab5ee342b9
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ public:
void setDebugLoc(const DebugLoc &DL) { this->State.DL = DL; }
/// Get the current instruction's debug location.
DebugLoc getDebugLoc() { return State.DL; }
const DebugLoc &getDebugLoc() { return State.DL; }
/// Build and insert <empty> = \p Opcode <empty>.
/// The insertion point is the one set by the last call of either