From 16463dded57185248d503da74be245c3163d87cb Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Mon, 5 Apr 2021 12:03:01 -0700 Subject: [PATCH] [SYCL] Fix DeclareSYCLBuiltins for round-trip setting. Upstream LLVMadded a round-trip functionality to the command line args so that we can generate a full set of command line arguments from our existing state. At the moment, this is 'assert' build only, but it seems the intent is to make this perminent for future functionality. We will have to analyze the full set of our command line args to make sure we do this right (that is, that it gets set right the 2nd time), but this one fixes the DeclareSYCLBuiltins to unblock the pulldown's build. --- clang/lib/Frontend/CompilerInvocation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index e382ae293549c..d458f8007629b 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3496,6 +3496,9 @@ void CompilerInvocation::GenerateLangArgs(const LangOptions &Opts, if (Opts.getSignReturnAddressKey() == 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,