Timm =?utf-8?q?Bäder?= <[email protected]>,
Timm =?utf-8?q?Bäder?= <[email protected]>,
Timm =?utf-8?q?Bäder?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -6673,8 +6673,15 @@ void Clang::ConstructJob(Compilation &C, const JobAction 
&JA,
 
   Args.AddLastArg(CmdArgs, options::OPT_fexperimental_library);
 
-  if (Args.hasArg(options::OPT_fexperimental_new_constant_interpreter))
-    CmdArgs.push_back("-fexperimental-new-constant-interpreter");
+  if (CLANG_USE_EXPERIMENTAL_CONST_INTERP) {
----------------
yronglin wrote:

Does `CLANG_USE_EXPERIMENTAL_CONST_INTERP` a macro that defined in cmake 
generated headers?

If it's a macro, can we use:

```cpp
#if defined(CLANG_USE_EXPERIMENTAL_CONST_INTERP) && 
CLANG_USE_EXPERIMENTAL_CONST_INTERP
    Args.ClaimAllArgs(options::OPT_fexperimental_new_constant_interpreter);
    Args.AddLastArg(CmdArgs,
                    options::OPT_fno_experimental_new_constant_interpreter);
#else
    Args.ClaimAllArgs(options::OPT_fno_experimental_new_constant_interpreter);
    Args.AddLastArg(CmdArgs,
                    options::OPT_fexperimental_new_constant_interpreter);
#endif
```

What do you think?

The `CLANG_USE_EXPERIMENTAL_CONST_INTERP` used as a variable like things, the 
name looks wired.

https://github.com/llvm/llvm-project/pull/200716
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to