diff options
author | Sean Callanan <scallanan@apple.com> | 2016-09-14 20:58:31 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2016-09-14 20:58:31 +0000 |
commit | aa4b44c66265621237537444838fc8946e86885a (patch) | |
tree | 8de0bf26c8ad515974af2959c5211a13332425fe | |
parent | 1b9fc8ed659589ee2f1d010adfd63f3d890c6ec3 (diff) | |
download | bcm5719-llvm-aa4b44c66265621237537444838fc8946e86885a.tar.gz bcm5719-llvm-aa4b44c66265621237537444838fc8946e86885a.zip |
Replaced two instances of std::function with auto.
Thanks to Zachary Turner for the suggestion. It's distasteful that the actual
type of the lambda can't be spelled out, but it should be evident from the
definition of the lambda body.
llvm-svn: 281536
-rw-r--r-- | lldb/source/Expression/DWARFExpression.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Target/StackFrame.cpp | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 07bdca4ecc3..71abadd22d4 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -3335,10 +3335,9 @@ bool DWARFExpression::MatchesOperand(StackFrame &frame, return false; } - std::function<bool(const Instruction::Operand &)> recurse = - [&frame, fb_expr](const Instruction::Operand &child) { - return fb_expr->MatchesOperand(frame, child); - }; + auto recurse = [&frame, fb_expr](const Instruction::Operand &child) { + return fb_expr->MatchesOperand(frame, child); + }; if (!offset && MatchUnaryOp(MatchOpType(Instruction::Operand::Type::Dereference), diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index eb49724b9ec..570464b941c 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -1608,10 +1608,9 @@ lldb::ValueObjectSP DoGuessValueAt(StackFrame &frame, ConstString reg, } Instruction::Operand *origin_operand = nullptr; - std::function<bool(const Instruction::Operand &)> clobbered_reg_matcher = - [reg_info](const Instruction::Operand &op) { - return MatchRegOp(*reg_info)(op) && op.m_clobbered; - }; + auto clobbered_reg_matcher = [reg_info](const Instruction::Operand &op) { + return MatchRegOp(*reg_info)(op) && op.m_clobbered; + }; if (clobbered_reg_matcher(operands[0])) { origin_operand = &operands[1]; |