Author: spyffe
Date: Wed Sep 14 15:58:31 2016
New Revision: 281536

URL: http://llvm.org/viewvc/llvm-project?rev=281536&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Expression/DWARFExpression.cpp
    lldb/trunk/source/Target/StackFrame.cpp

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=281536&r1=281535&r2=281536&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Wed Sep 14 15:58:31 2016
@@ -3335,10 +3335,9 @@ bool DWARFExpression::MatchesOperand(Sta
       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),

Modified: lldb/trunk/source/Target/StackFrame.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/StackFrame.cpp?rev=281536&r1=281535&r2=281536&view=diff
==============================================================================
--- lldb/trunk/source/Target/StackFrame.cpp (original)
+++ lldb/trunk/source/Target/StackFrame.cpp Wed Sep 14 15:58:31 2016
@@ -1608,10 +1608,9 @@ lldb::ValueObjectSP DoGuessValueAt(Stack
     }
 
     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];


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to