forked from OSchip/llvm-project
[mlir][unittest] Fix crash when building with MSVC 2022
The test Dialect/Affine/ops.mlir was failing when building with Visual Studio 2022 version 17.3.5. This was caused by a bad MSVC codegen, when capturing a `constexpr` in a lambda. The bug was reported to Microsoft, see differential for more information. Differential revision: https://reviews.llvm.org/D134227
This commit is contained in:
parent
941f71adf6
commit
083617afc2
|
@ -3807,7 +3807,9 @@ enum class MinMaxKind { Min, Max };
|
|||
static ParseResult parseAffineMapWithMinMax(OpAsmParser &parser,
|
||||
OperationState &result,
|
||||
MinMaxKind kind) {
|
||||
constexpr llvm::StringLiteral tmpAttrStrName = "__pseudo_bound_map";
|
||||
// Using `const` not `constexpr` below to workaround a MSVC optimizer bug,
|
||||
// see: https://reviews.llvm.org/D134227#3821753
|
||||
const llvm::StringLiteral tmpAttrStrName = "__pseudo_bound_map";
|
||||
|
||||
StringRef mapName = kind == MinMaxKind::Min
|
||||
? AffineParallelOp::getUpperBoundsMapAttrStrName()
|
||||
|
|
Loading…
Reference in New Issue