diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td index dfea7fd128f8f..f1df2b76f8f38 100644 --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -5559,8 +5559,10 @@ def finclude_default_header : Flag<["-"], "finclude-default-header">, HelpText<"Include default header file for OpenCL">; def fdeclare_opencl_builtins : Flag<["-"], "fdeclare-opencl-builtins">, HelpText<"Add OpenCL builtin function declarations (experimental)">; -def fdeclare_spirv_builtins : Flag<["-"], "fdeclare-spirv-builtins">, - HelpText<"Add SPIR-V builtin function declarations (experimental)">; +def fdeclare_spirv_builtins + : Flag<["-"], "fdeclare-spirv-builtins">, + HelpText<"Add SPIR-V builtin function declarations (experimental)">, + MarshallingInfoFlag>; def fpreserve_vec3_type : Flag<["-"], "fpreserve-vec3-type">, HelpText<"Preserve 3-component vector type">, diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 4d09701945d7f..24238f5fe5c40 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3502,8 +3502,6 @@ void CompilerInvocation::GenerateLangArgs(const LangOptions &Opts, LangOptions::SignReturnAddressKeyKind::BKey) GenerateArg(Args, OPT_msign_return_address_key_EQ, "b_key", SA); - if (Opts.DeclareSPIRVBuiltins) - GenerateArg(Args, OPT_fdeclare_spirv_builtins, SA); } bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, @@ -3594,8 +3592,6 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, } } - Opts.DeclareSPIRVBuiltins = Args.hasArg(OPT_fdeclare_spirv_builtins); - // These need to be parsed now. They are used to set OpenCL defaults. Opts.IncludeDefaultHeader = Args.hasArg(OPT_finclude_default_header); Opts.DeclareOpenCLBuiltins = Args.hasArg(OPT_fdeclare_opencl_builtins);