aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-05-07 14:48:10 +0100
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-05-07 14:48:23 +0100
commitc9d4b4173b56c5a56d32d07be660f872b9746f87 (patch)
tree69cecca9c3a41a374b6f0b9db57a2db9f5eec505 /llvm/lib/CodeGen/LiveDebugVariables.cpp
parentdd21c6b843b25d2d65daab561fe47b4157c32952 (diff)
downloadllvm-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.cpp4
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 *);
};