[clang] [clang] Respect `CLANG_USE_EXPERIMENTAL_CONST_INTERP` (PR #200716)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Sun May 31 22:24:57 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/200716
Seems like https://github.com/llvm/llvm-project/pull/199396 had no effect at all, even though the patch itself seems pretty obvious.
With this patch `clang -c` will use the bytecode interpreter, but `clang -cc1` still won't. I'd like to change the behavior for `-cc1` as well but no idea how.
>From 069fd89d0a8251e49c0e6c2c0cbc7934f6309852 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Mon, 1 Jun 2026 07:17:53 +0200
Subject: [PATCH] asdf
---
clang/lib/Driver/ToolChains/Clang.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 7657afb14f077..f408dd1c9d5c8 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -6680,7 +6680,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
Args.AddLastArg(CmdArgs, options::OPT_fexperimental_library);
- if (Args.hasArg(options::OPT_fexperimental_new_constant_interpreter))
+ if (Args.hasArg(options::OPT_fexperimental_new_constant_interpreter) ||
+ CLANG_USE_EXPERIMENTAL_CONST_INTERP)
CmdArgs.push_back("-fexperimental-new-constant-interpreter");
if (Arg *A = Args.getLastArg(options::OPT_fbracket_depth_EQ)) {
More information about the cfe-commits
mailing list