1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[CodeGen] Ensure UserValue::getDebugLoc() and UserLabel::getDebugLoc() consistently return 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-07 14:48:10 +01:00
parent b5e4cc0124
commit 9edfcde2eb

View File

@ -473,7 +473,7 @@ public:
BlockSkipInstsMap &BBSkipInstsMap);
/// Return DebugLoc of this UserValue.
DebugLoc getDebugLoc() { return dl;}
const DebugLoc &getDebugLoc() { return dl; }
void print(raw_ostream &, const TargetRegisterInfo *);
};
@ -506,7 +506,7 @@ public:
BlockSkipInstsMap &BBSkipInstsMap);
/// Return DebugLoc of this UserLabel.
DebugLoc getDebugLoc() { return dl; }
const DebugLoc &getDebugLoc() { return dl; }
void print(raw_ostream &, const TargetRegisterInfo *);
};