Skip to content

Commit e7137f2

Browse files
committed
[Passes] Try to fix build on windows
Some passes reference *this (inside decltype) which fails with MSVC. Fix this by not explicitly specifying the captures (otherwise we would get an unused lambda capture warning for cases where this is *not* used).
1 parent 790f931 commit e7137f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Passes/TargetPassRegistry.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
auto *PIC = PB.getPassInstrumentationCallbacks();
2525
if (PIC) {
26-
PIC->registerClassToPassNameCallback([PIC]() {
26+
PIC->registerClassToPassNameCallback([&]() {
2727
#define ADD_CLASS_PASS_TO_PASS_NAME(NAME, CREATE_PASS) \
2828
PIC->addClassToPassName(decltype(CREATE_PASS)::name(), NAME);
2929
#define ADD_CLASS_PASS_TO_PASS_NAME_WITH_PARAMS(NAME, CLASS) \

0 commit comments

Comments
 (0)