On Wed, Sep 14, 2016 at 1:38 PM Sean Callanan via lldb-commits <
lldb-commits@lists.llvm.org> wrote:

>
>      Instruction::Operand *origin_operand = nullptr;
> -    if (operands[0].m_type == Instruction::Operand::Type::Register &&
> -        operands[0].m_clobbered == true && operands[0].m_register == reg)
> {
> -      // operands[0] is a register operand
> +    std::function<bool(const Instruction::Operand &)>
> clobbered_reg_matcher =
> +        [reg_info](const Instruction::Operand &op) {
> +          return MatchRegOp(*reg_info)(op) && op.m_clobbered;
> +        };
>
You should use `auto` here instead of `std::function`.  Putting it in a
std::function is actually less efficient due to the way it's implemented,
but if you use `auto` you get the actual lambda type itself.
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to