[clang] [CIR] Refactor global variable emission and initialization (PR #138222)
Morris Hafner via cfe-commits
cfe-commits at lists.llvm.org
Fri May 2 12:16:20 PDT 2025
================
@@ -90,8 +90,100 @@ class ConstExprEmitter
}
mlir::Attribute VisitCastExpr(CastExpr *e, QualType destType) {
- cgm.errorNYI(e->getBeginLoc(), "ConstExprEmitter::VisitCastExpr");
- return {};
+ if (const auto *ece = dyn_cast<ExplicitCastExpr>(e))
+ cgm.errorNYI(e->getBeginLoc(),
+ "ConstExprEmitter::VisitCastExpr explicit cast");
+ Expr *subExpr = e->getSubExpr();
+
+ switch (e->getCastKind()) {
+ case CK_HLSLArrayRValue:
----------------
mmha wrote:
OGCG returns `nullptr` for the HLSL casts. The incubator has them as NYI.
https://github.com/llvm/llvm-project/pull/138222
More information about the cfe-commits
mailing list