diff options
author | aniplcc <aniplccode@gmail.com> | 2024-04-02 23:59:57 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-02 13:29:57 -0500 |
commit | 3d469c0e7c3072f0dad0f5e9bd0c74dffaf83cd3 (patch) | |
tree | ae88807622717266e44e2fbc9b975875b46195dd /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f792f14b01605453c7c0c17f3b4564335c0d9d14 (diff) | |
download | llvm-3d469c0e7c3072f0dad0f5e9bd0c74dffaf83cd3.zip llvm-3d469c0e7c3072f0dad0f5e9bd0c74dffaf83cd3.tar.gz llvm-3d469c0e7c3072f0dad0f5e9bd0c74dffaf83cd3.tar.bz2 |
[HLSL] Enable -fconvergent-functions by default (#86571)
Fixes #86506
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index f1bd3cd..c5bfb8e 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3516,7 +3516,8 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Consumer, OPT_fblocks); if (Opts.ConvergentFunctions && - !(Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) || Opts.SYCLIsDevice)) + !(Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) || Opts.SYCLIsDevice || + Opts.HLSL)) GenerateArg(Consumer, OPT_fconvergent_functions); if (Opts.NoBuiltin && !Opts.Freestanding) @@ -3914,7 +3915,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.ConvergentFunctions = Args.hasArg(OPT_fconvergent_functions) || Opts.OpenCL || (Opts.CUDA && Opts.CUDAIsDevice) || - Opts.SYCLIsDevice; + Opts.SYCLIsDevice || Opts.HLSL; Opts.NoBuiltin = Args.hasArg(OPT_fno_builtin) || Opts.Freestanding; if (!Opts.NoBuiltin) |