Commit a81b5ed8 authored by Paul's avatar Paul
Browse files

Fix ICE on gcc

parent 7c8e1979
......@@ -283,12 +283,14 @@ struct folder
template <class Selector>
auto operator[](Selector select) const
{
return [=](auto... ms) {
return [=](auto... mms) {
// Workaround ICE on gcc by packing matchers into an object
auto mpack = pack(mms...);
return make_bf_matcher([=](matcher_context& ctx, instruction_ref start) {
Op op;
bool matches = Start;
select(start, [&](auto ins) {
auto fm = [&] { return folder::fold_match(ctx, ins, ms...); };
auto fm = [&] { return mpack([&](auto... ms) { return folder::fold_match(ctx, ins, ms...); }); };
matches = op(always(matches), fm);
});
if(matches == Matches)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment