diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-04-27 21:41:36 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-04-27 21:41:36 +0000 |
commit | 210a29de7bcc6dcf73fec98efe38e2e1fac83c50 (patch) | |
tree | fd434f8f89a9706e581bd115715220a67dafb61a /llvm/lib/IR/DebugInfoMetadata.cpp | |
parent | 6959b8e76f18f63aacaaf24dd74b11d733b57314 (diff) | |
download | bcm5719-llvm-210a29de7bcc6dcf73fec98efe38e2e1fac83c50.tar.gz bcm5719-llvm-210a29de7bcc6dcf73fec98efe38e2e1fac83c50.zip |
Fix a bug in GlobalOpt's handling of DIExpressions.
This patch adds support for fragment expressions
TryToShrinkGlobalToBoolean() which were previously just dropped.
Thanks to Reid Kleckner for providing me a reproducer!
llvm-svn: 331086
Diffstat (limited to 'llvm/lib/IR/DebugInfoMetadata.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfoMetadata.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/DebugInfoMetadata.cpp b/llvm/lib/IR/DebugInfoMetadata.cpp index fe57aa7442a..f1ad72d7327 100644 --- a/llvm/lib/IR/DebugInfoMetadata.cpp +++ b/llvm/lib/IR/DebugInfoMetadata.cpp @@ -785,12 +785,12 @@ DIExpression *DIExpression::prepend(const DIExpression *Expr, bool DerefBefore, if (DerefAfter) Ops.push_back(dwarf::DW_OP_deref); - return doPrepend(Expr, Ops, StackValue); + return prependOpcodes(Expr, Ops, StackValue); } -DIExpression *DIExpression::doPrepend(const DIExpression *Expr, - SmallVectorImpl<uint64_t> &Ops, - bool StackValue) { +DIExpression *DIExpression::prependOpcodes(const DIExpression *Expr, + SmallVectorImpl<uint64_t> &Ops, + bool StackValue) { if (Expr) for (auto Op : Expr->expr_ops()) { // A DW_OP_stack_value comes at the end, but before a DW_OP_LLVM_fragment. |