From 8a84287b0edc66fc6dede3db770d10ff41da5464 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 25 Dec 2021 23:36:56 +0100 Subject: Merge llvm-project main llvmorg-14-init-13186-g0c553cc1af2e This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-14-init-13186-g0c553cc1af2e. PR: 261742 MFC after: 2 weeks (cherry picked from commit 0eae32dcef82f6f06de6419a0d623d7def0cc8f6) --- .../clang/lib/Frontend/CompilerInvocation.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp b/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp index c104a6f40e20..b71addd84bfd 100644 --- a/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp +++ b/contrib/llvm-project/clang/lib/Frontend/CompilerInvocation.cpp @@ -770,9 +770,7 @@ static void parseAnalyzerConfigs(AnalyzerOptions &AnOpts, static void getAllNoBuiltinFuncValues(ArgList &Args, std::vector &Funcs) { std::vector Values = Args.getAllArgValues(OPT_fno_builtin_); - auto BuiltinEnd = llvm::partition(Values, [](const std::string FuncName) { - return Builtin::Context::isBuiltinFunc(FuncName); - }); + auto BuiltinEnd = llvm::partition(Values, Builtin::Context::isBuiltinFunc); Funcs.insert(Funcs.end(), Values.begin(), BuiltinEnd); } @@ -1285,7 +1283,7 @@ static std::string serializeXRayInstrumentationBundle(const XRayInstrSet &S) { std::string Buffer; llvm::raw_string_ostream OS(Buffer); llvm::interleave(BundleParts, OS, [&OS](StringRef Part) { OS << Part; }, ","); - return OS.str(); + return Buffer; } // Set the profile kind using fprofile-instrument-use-path. @@ -4123,6 +4121,13 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, {std::string(Split.first), std::string(Split.second)}); } + // Error if -mvscale-min is unbounded. + if (Arg *A = Args.getLastArg(options::OPT_mvscale_min_EQ)) { + unsigned VScaleMin; + if (StringRef(A->getValue()).getAsInteger(10, VScaleMin) || VScaleMin == 0) + Diags.Report(diag::err_cc1_unbounded_vscale_min); + } + return Diags.getNumErrors() == NumErrorsBefore; } @@ -4513,7 +4518,7 @@ bool CompilerInvocation::CreateFromArgsImpl( // Store the command-line for using in the CodeView backend. Res.getCodeGenOpts().Argv0 = Argv0; - Res.getCodeGenOpts().CommandLineArgs = CommandLineArgs; + append_range(Res.getCodeGenOpts().CommandLineArgs, CommandLineArgs); FixupInvocation(Res, Diags, Args, DashX); -- cgit v1.2.3