[PATCH] D78962: fix D78849 for g++ < 7.1

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 13:28:09 PDT 2020


nickdesaulniers created this revision.
nickdesaulniers added reviewers: MaskRay, efriedma, jyknight, craig.topper.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
nickdesaulniers edited the summary of this revision.
nickdesaulniers edited the summary of this revision.
nickdesaulniers retitled this revision from "fix D78849" to "fix D78849 for g++ < 7.1".

Looks like g++ < 7.1 has a bug resolving calls to member functions without
`this->` in generic lamdas.  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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78962

Files:
  llvm/lib/CodeGen/MachineVerifier.cpp


Index: llvm/lib/CodeGen/MachineVerifier.cpp
===================================================================
--- llvm/lib/CodeGen/MachineVerifier.cpp
+++ llvm/lib/CodeGen/MachineVerifier.cpp
@@ -168,14 +168,14 @@
 
       // 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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78962.260431.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/cd502bca/attachment.bin>


More information about the llvm-commits mailing list