From: Daniel Dunbar Date: Thu, 19 Nov 2009 05:32:09 +0000 (+0000) Subject: Change -code-completion-debug-printer to -no-code-completion-debug-printer. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4db166b723495fbfa475b50c44f38a4c1bc0bc34;p=clang Change -code-completion-debug-printer to -no-code-completion-debug-printer. Also, tweak a few help strings and update CompilerInvocation serialization for prev change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89317 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index ed6d0b71a5..dd99c09387 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -83,8 +83,8 @@ static void AnalyzerOptsToArgs(const AnalyzerOptions &Opts, Res.push_back("-analyzer-display-progress"); if (Opts.EagerlyAssume) Res.push_back("-analyzer-eagerly-assume"); - if (Opts.PurgeDead) - Res.push_back("-analyzer-purge-dead"); + if (!Opts.PurgeDead) + Res.push_back("-analyzer-no-purge-dead"); if (Opts.TrimGraph) Res.push_back("-trim-egraph"); if (Opts.VisualizeEGDot) @@ -238,7 +238,7 @@ static const char *getActionName(frontend::ActionKind Kind) { static void FrontendOptsToArgs(const FrontendOptions &Opts, std::vector &Res) { if (!Opts.DebugCodeCompletionPrinter) - Res.push_back("-code-completion-debug-printer=0"); + Res.push_back("-no-code-completion-debug-printer"); if (Opts.DisableFree) Res.push_back("-disable-free"); if (Opts.EmptyInputOnly) @@ -394,8 +394,8 @@ static void LangOptsToArgs(const LangOptions &Opts, Res.push_back("-faltivec"); Res.push_back("-fexceptions"); Res.push_back(Opts.Exceptions ? "1" : "0"); - Res.push_back("-frtti"); - Res.push_back(Opts.Rtti ? "1" : "0"); + if (!Opts.Rtti) + Res.push_back("-fno-rtti"); if (!Opts.NeXTRuntime) Res.push_back("-fgnu-runtime"); if (Opts.Freestanding) @@ -411,7 +411,7 @@ static void LangOptsToArgs(const LangOptions &Opts, if (Opts.EmitAllDecls) Res.push_back("-femit-all-decls"); if (!Opts.MathErrno) - Res.push_back("-fmath-errno=0"); + Res.push_back("-fno-math-errno"); if (Opts.OverflowChecking) Res.push_back("-ftrapv"); if (Opts.HeinousExtensions) diff --git a/tools/CIndex/CIndex.cpp b/tools/CIndex/CIndex.cpp index ebdba29d92..46732de785 100644 --- a/tools/CIndex/CIndex.cpp +++ b/tools/CIndex/CIndex.cpp @@ -1219,7 +1219,7 @@ void clang_codeComplete(CXIndex CIdx, argv.push_back("-Xclang"); argv.push_back(code_complete_at.c_str()); argv.push_back("-Xclang"); - argv.push_back("-code-completion-debug-printer=0"); + argv.push_back("-no-code-completion-debug-printer"); // Add the source file name (FIXME: later, we'll want to build temporary // file from the buffer, or just feed the source text via standard input). diff --git a/tools/clang-cc/Options.cpp b/tools/clang-cc/Options.cpp index 34f9c4a4cb..e27d697377 100644 --- a/tools/clang-cc/Options.cpp +++ b/tools/clang-cc/Options.cpp @@ -105,7 +105,7 @@ EagerlyAssume("analyzer-eagerly-assume", static llvm::cl::opt NoPurgeDead("analyzer-no-purge-dead", - llvm::cl::desc("Remove dead symbols, bindings, and constraints before" + llvm::cl::desc("Don't remove dead symbols, bindings, and constraints before" " processing a statement")); static llvm::cl::opt @@ -283,9 +283,8 @@ CodeCompletionAt("code-completion-at", llvm::cl::desc("Dump code-completion information at a location")); static llvm::cl::opt -CodeCompletionDebugPrinter("code-completion-debug-printer", - llvm::cl::desc("Use the \"debug\" code-completion print"), - llvm::cl::init(true)); +NoCodeCompletionDebugPrinter("no-code-completion-debug-printer", + llvm::cl::desc("Don't the \"debug\" code-completion print")); static llvm::cl::opt CodeCompletionWantsMacros("code-completion-macros", @@ -532,7 +531,7 @@ MainFileName("main-file-name", static llvm::cl::opt NoMathErrno("fno-math-errno", - llvm::cl::desc("Require math functions to respect errno")); + llvm::cl::desc("Don't require math functions to respect errno")); static llvm::cl::opt NoElideConstructors("fno-elide-constructors", @@ -590,7 +589,7 @@ PascalStrings("fpascal-strings", static llvm::cl::opt NoRtti("fno-rtti", - llvm::cl::desc("Enable generation of rtti information")); + llvm::cl::desc("Disable generation of rtti information")); static llvm::cl::opt ShortWChar("fshort-wchar", @@ -867,7 +866,7 @@ void clang::InitializeFrontendOptions(FrontendOptions &Opts) { } Opts.CodeCompletionAt = CodeCompletionAt; - Opts.DebugCodeCompletionPrinter = CodeCompletionDebugPrinter; + Opts.DebugCodeCompletionPrinter = !NoCodeCompletionDebugPrinter; Opts.DisableFree = DisableFree; Opts.EmptyInputOnly = EmptyInputOnly; Opts.FixItLocations = FixItAtLocations;