[clang] feat: included support for is_constant builtin (PR #166832)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 11 01:50:37 PST 2025
================
@@ -199,6 +199,43 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
return RValue::get(
builder.createBitcast(allocaAddr, builder.getVoidPtrTy()));
}
+
+ case Builtin::BI__builtin_constant_p: {
+ mlir::Location loc = getLoc(e->getSourceRange());
+ mlir::Type ResultType = convertType(e->getType());
+
+ const Expr *Arg = e->getArg(0);
+ QualType ArgType = Arg->getType();
----------------
xlauko wrote:
```suggestion
const Expr *arg = e->getArg(0);
QualType argType = arg->getType();
```
https://github.com/llvm/llvm-project/pull/166832
More information about the cfe-commits
mailing list