[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Wed May 28 10:58:43 PDT 2025
================
@@ -108,6 +108,152 @@ class CIRGenFunction : public CIRGenTypeCache {
mlir::MLIRContext &getMLIRContext() { return cgm.getMLIRContext(); }
+ // ---------------------
+ // Opaque value handling
+ // ---------------------
+
+ /// Keeps track of the current set of opaque value expressions.
+ llvm::DenseMap<const OpaqueValueExpr *, LValue> opaqueLValues;
+ llvm::DenseMap<const OpaqueValueExpr *, RValue> opaqueRValues;
+
+ // This keeps track of the associated size for each VLA type.
+ // We track this by the size expression rather than the type itself because
+ // in certain situations, like a const qualifier applied to an VLA typedef,
+ // multiple VLA types can share the same size expression.
+ // FIXME: Maybe this could be a stack of maps that is pushed/popped as we
+ // enter/leave scopes.
+ llvm::DenseMap<const Expr *, mlir::Value> vlaSizeMap;
----------------
andykaylor wrote:
Is this used in this PR?
https://github.com/llvm/llvm-project/pull/138156
More information about the cfe-commits
mailing list