1 //===- AffineStructuresParser.cpp - Parser for AffineStructures -*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "./AffineStructuresParser.h" 10 #include "mlir/IR/IntegerSet.h" 11 #include "mlir/Parser/Parser.h" 12 13 using namespace mlir; 14 15 FailureOr<FlatAffineConstraints> 16 mlir::parseIntegerSetToFAC(llvm::StringRef str, MLIRContext *context, 17 bool printDiagnosticInfo) { 18 IntegerSet set = parseIntegerSet(str, context, printDiagnosticInfo); 19 20 if (!set) 21 return failure(); 22 23 return FlatAffineConstraints(set); 24 } 25