diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-05-07 14:48:10 +0100 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2021-05-07 14:48:23 +0100 |
commit | c9d4b4173b56c5a56d32d07be660f872b9746f87 (patch) | |
tree | 69cecca9c3a41a374b6f0b9db57a2db9f5eec505 /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | dd21c6b843b25d2d65daab561fe47b4157c32952 (diff) | |
download | llvm-c9d4b4173b56c5a56d32d07be660f872b9746f87.zip llvm-c9d4b4173b56c5a56d32d07be660f872b9746f87.tar.gz llvm-c9d4b4173b56c5a56d32d07be660f872b9746f87.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index ce898cd..100dacb 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -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 *); }; |