Skip to content

Commit a074091

Browse files
authored
Replace inserter() with inserts to work-around C++20 strict requirement/bug in libstdc++10 (#12)
Signed-off-by: Phillip Kuznetsov <[email protected]>
1 parent 695aa04 commit a074091

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,12 @@ static void createNewAliasScopesFromNoAliasParameter(
327327
getUnderlyingObjectSet(pointer);
328328
if (failed(underlyingObjectSet))
329329
return;
330-
llvm::copy(*underlyingObjectSet,
331-
std::inserter(basedOnPointers, basedOnPointers.begin()));
330+
// Switched from llvm::copy(*underlyingObjectSet,
331+
// std::inserter(basedonPointers, ...)) to support libstdc++10 and
332+
// C++20. We need to support this so that python bindings can be built
333+
// with widely compatible versions of glibc.
334+
for (Value v : *underlyingObjectSet)
335+
basedOnPointers.insert(v);
332336
}
333337

334338
bool aliasesOtherKnownObject = false;

0 commit comments

Comments
 (0)