From 59acdf0aca10b78c5d3885f9721779585593074a Mon Sep 17 00:00:00 2001 From: Nick Desaulniers Date: Mon, 27 Apr 2020 13:46:56 -0700 Subject: [PATCH] fix D78849 for g++ < 7.1 Summary: Looks like g++ < 7.1 has a bug resolving calls to member functions without `this->` in lamdas with `auto` types. It looks like multiple build bots are using g++-5. https://stackoverflow.com/questions/32097759/calling-this-member-function-from-generic-lambda-clang-vs-gcc https://godbolt.org/z/MiaRt- Reviewers: MaskRay, efriedma, jyknight, craig.topper, rsmith Reviewed By: rsmith Subscribers: hiraditya, llvm-commits, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D78962 --- llvm/lib/CodeGen/MachineVerifier.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index 2c570f1..e113db64 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -168,14 +168,14 @@ namespace { // Same for a full set. bool addRequired(const RegSet &RS) { - return llvm::any_of(RS, - [this](unsigned Reg) { return addRequired(Reg); }); + return llvm::any_of( + RS, [this](unsigned Reg) { return this->addRequired(Reg); }); } // Same for a full map. bool addRequired(const RegMap &RM) { return llvm::any_of( - RM, [this](const auto &P) { return addRequired(P.first); }); + RM, [this](const auto &P) { return this->addRequired(P.first); }); } // Live-out registers are either in regsLiveOut or vregsPassed. -- 2.7.4