[clang] [CIR] Lower pointer const_array globals without insertvalue chains (PR #198427)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 2 16:46:49 PDT 2026
================
@@ -78,6 +97,13 @@ void convertToDenseElementsAttrImpl(
auto arrayAttr = mlir::cast<mlir::ArrayAttr>(attr.getElts());
for (auto eltAttr : arrayAttr) {
+ if (auto boolAttr = mlir::dyn_cast<cir::BoolAttr>(eltAttr)) {
+ if constexpr (std::is_same_v<StorageTy, mlir::APInt>) {
----------------
adams381 wrote:
Hoisted the `if constexpr` above the `dyn_cast` so the cast is only instantiated for the integer storage type.
https://github.com/llvm/llvm-project/pull/198427
More information about the cfe-commits
mailing list