Skip to content

Commit 56ef35e

Browse files
committed
Add missing features
1 parent ed0a86b commit 56ef35e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/include/clang/CIR/MissingFeatures.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ struct MissingFeatures {
111111
static bool scalableVectors() { return false; }
112112
static bool unsizedTypes() { return false; }
113113
static bool vectorType() { return false; }
114+
static bool stringTypeWithDifferentArraySize() { return false; }
114115

115116
// Future CIR operations
116117
static bool awaitOp() { return false; }

clang/lib/CIR/Lowering/LoweringHelpers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "clang/CIR/LoweringHelpers.h"
14+
#include "clang/CIR/MissingFeatures.h"
1415

1516
mlir::DenseElementsAttr
1617
convertStringAttrToDenseElementsAttr(cir::ConstArrayAttr attr,
@@ -23,8 +24,7 @@ convertStringAttrToDenseElementsAttr(cir::ConstArrayAttr attr,
2324

2425
const auto arrayTy = mlir::cast<cir::ArrayType>(attr.getType());
2526
if (arrayTy.getSize() != stringAttr.size())
26-
llvm_unreachable("array type of the length not equal to that of the string "
27-
"attribute is not supported yet");
27+
assert(!cir::MissingFeatures::stringTypeWithDifferentArraySize());
2828

2929
return mlir::DenseElementsAttr::get(
3030
mlir::RankedTensorType::get({(int64_t)values.size()}, type),

0 commit comments

Comments
 (0)