From a53b56e4c4de09c1d21d44af79a8a73089521ee9 Mon Sep 17 00:00:00 2001 From: Groverkss Date: Thu, 15 Sep 2022 18:29:22 +0100 Subject: [PATCH] Revert "[mlir] Remove the unused source file." This reverts commit e488ce29ec5ead2d518c183890215313c9d1b1f0. Reverted to fix a compilation issue on gcc8. --- .../Affine/Analysis/AffineStructuresParser.cpp | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 mlir/unittests/Dialect/Affine/Analysis/AffineStructuresParser.cpp diff --git a/mlir/unittests/Dialect/Affine/Analysis/AffineStructuresParser.cpp b/mlir/unittests/Dialect/Affine/Analysis/AffineStructuresParser.cpp new file mode 100644 index 0000000..4bd15e4 --- /dev/null +++ b/mlir/unittests/Dialect/Affine/Analysis/AffineStructuresParser.cpp @@ -0,0 +1,25 @@ +//===- AffineStructuresParser.cpp - Parser for AffineStructures -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "./AffineStructuresParser.h" +#include "mlir/AsmParser/AsmParser.h" +#include "mlir/IR/IntegerSet.h" + +using namespace mlir; +using namespace presburger; + +FailureOr +mlir::parseIntegerSetToFAC(llvm::StringRef str, MLIRContext *context, + bool printDiagnosticInfo) { + IntegerSet set = parseIntegerSet(str, context, printDiagnosticInfo); + + if (!set) + return failure(); + + return FlatAffineValueConstraints(set); +} -- 2.7.4