aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
index b78757b..eec3de9 100644
--- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp
@@ -2151,7 +2151,9 @@ bool VarLocBasedLDV::isEntryValueCandidate(
// TODO: Add support for parameters that have a pre-existing debug expressions
// (e.g. fragments).
- if (MI.getDebugExpression()->getNumElements() > 0)
+ // A simple deref expression is equivalent to an indirect debug value.
+ const DIExpression *Expr = MI.getDebugExpression();
+ if (Expr->getNumElements() > 0 && !Expr->isDeref())
return false;
return true;