[mlir] Fix a warning

This patch fixes:

  mlir/lib/IR/MLIRContext.cpp:1020:3: error: use of the 'nodiscard'
  attribute is a C++17 extension [-Werror,-Wc++17-extensions]
This commit is contained in:
Kazu Hirata 2021-11-26 12:27:11 -08:00
parent bfa91f38a9
commit 803cec0268

View File

@ -1017,9 +1017,9 @@ AffineMap AffineMap::getImpl(unsigned dimCount, unsigned symbolCount,
/// present in result expressions is less than `dimCount` and the highest index
/// of symbolic identifier present in result expressions is less than
/// `symbolCount`.
[[nodiscard]] static bool willBeValidAffineMap(unsigned dimCount,
unsigned symbolCount,
ArrayRef<AffineExpr> results) {
LLVM_NODISCARD static bool willBeValidAffineMap(unsigned dimCount,
unsigned symbolCount,
ArrayRef<AffineExpr> results) {
int64_t maxDimPosition = -1;
int64_t maxSymbolPosition = -1;
getMaxDimAndSymbol(ArrayRef<ArrayRef<AffineExpr>>(results), maxDimPosition,