Skip to content

Commit 59acdf0

Browse files
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
1 parent 612720d commit 59acdf0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,14 @@ namespace {
168168

169169
// Same for a full set.
170170
bool addRequired(const RegSet &RS) {
171-
return llvm::any_of(RS,
172-
[this](unsigned Reg) { return addRequired(Reg); });
171+
return llvm::any_of(
172+
RS, [this](unsigned Reg) { return this->addRequired(Reg); });
173173
}
174174

175175
// Same for a full map.
176176
bool addRequired(const RegMap &RM) {
177177
return llvm::any_of(
178-
RM, [this](const auto &P) { return addRequired(P.first); });
178+
RM, [this](const auto &P) { return this->addRequired(P.first); });
179179
}
180180

181181
// Live-out registers are either in regsLiveOut or vregsPassed.

0 commit comments

Comments
 (0)