From e2fc85c69b3f7aad89b5b59eca537bec96a24682 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Mon, 14 Dec 2020 09:49:55 +0100 Subject: [clang][cli] Better defaults for MarshallingInfoString Depends on D84018 Reviewed By: Bigcheese Original patch by Daniel Grumberg. Differential Revision: https://reviews.llvm.org/D84185 --- clang/lib/Frontend/CompilerInvocation.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 836f34c..3add57c 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -272,6 +272,15 @@ static void denormalizeSimpleEnumJoined(SmallVectorImpl &Args, "the tablegen option description"); } +static Optional normalizeString(OptSpecifier Opt, int TableIndex, + const ArgList &Args, + DiagnosticsEngine &Diags) { + auto *Arg = Args.getLastArg(Opt); + if (!Arg) + return None; + return std::string(Arg->getValue()); +} + static void denormalizeString(SmallVectorImpl &Args, const char *Spelling, CompilerInvocation::StringAllocator SA, @@ -498,8 +507,6 @@ static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args, .Case("false", false) .Default(false); - Opts.DumpExplodedGraphTo = - std::string(Args.getLastArgValue(OPT_analyzer_dump_egraph)); Opts.AnalyzeSpecificFunction = std::string(Args.getLastArgValue(OPT_analyze_function)); Opts.maxBlockVisitOnPath = -- cgit v1.1