[DAG] Ensure all SD classes consistently return a const reference with getDebugLoc(). NFCI.

Avoids a lot of unnecessary tracking increments/decrements of the underlying TrackingMDNodeRef.
This commit is contained in:
Simon Pilgrim 2021-05-07 13:43:10 +01:00
parent 6248d11190
commit dd21c6b843
1 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ public:
bool isVariadic() const { return IsVariadic; }
/// Returns the DebugLoc.
DebugLoc getDebugLoc() const { return DL; }
const DebugLoc &getDebugLoc() const { return DL; }
/// Returns the SDNodeOrder. This is the order of the preceding node in the
/// input.
@ -251,7 +251,7 @@ public:
MDNode *getLabel() const { return Label; }
/// Returns the DebugLoc.
DebugLoc getDebugLoc() const { return DL; }
const DebugLoc &getDebugLoc() const { return DL; }
/// Returns the SDNodeOrder. This is the order of the preceding node in the
/// input.