================
@@ -12,28 +12,47 @@
#include "clang/CIR/LoweringHelpers.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
+#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
+#include "mlir/IR/SymbolTable.h"
#include "clang/CIR/MissingFeatures.h"
+static unsigned getIntOrBoolBitWidth(mlir::Type ty) {
+ if (auto intTy = mlir::dyn_cast<cir::IntType>(ty))
+ return intTy.getWidth();
+ if (mlir::isa<cir::BoolType>(ty))
----------------
erichkeane wrote:
```suggestion
assert(mlir::isa<cir::BoolType>(ty));
```
Then you can just remove the unreachable.
https://github.com/llvm/llvm-project/pull/198427
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits