aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index baf674c..163236c 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -7994,7 +7994,9 @@ bool CodeGenPrepare::fixupDbgValue(Instruction *I) {
// Does this dbg.value refer to a sunk address calculation?
bool AnyChange = false;
- for (Value *Location : DVI.getValues()) {
+ SmallDenseSet<Value *> LocationOps(DVI.location_ops().begin(),
+ DVI.location_ops().end());
+ for (Value *Location : LocationOps) {
WeakTrackingVH SunkAddrVH = SunkAddrs[Location];
Value *SunkAddr = SunkAddrVH.pointsToAliveValue() ? SunkAddrVH : nullptr;
if (SunkAddr) {