[cfe-commits] r103162 - in /cfe/trunk: include/clang/Frontend/DiagnosticOptions.h lib/Driver/Tools.cpp
Chandler Carruth
chandlerc at gmail.com
Wed May 5 21:55:18 PDT 2010
Author: chandlerc
Date: Wed May 5 23:55:18 2010
New Revision: 103162
URL: http://llvm.org/viewvc/llvm-project?rev=103162&view=rev
Log:
Remove a dependency on Frontend headers in the Driver library. Also saves
building and passing arguments to cc1 layer when setting values to their
defaults.
Modified:
cfe/trunk/include/clang/Frontend/DiagnosticOptions.h
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/include/clang/Frontend/DiagnosticOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/DiagnosticOptions.h?rev=103162&r1=103161&r2=103162&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/DiagnosticOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/DiagnosticOptions.h Wed May 5 23:55:18 2010
@@ -81,8 +81,8 @@
VerifyDiagnostics = 0;
BinaryOutput = 0;
ErrorLimit = 0;
- TemplateBacktraceLimit = 0;
- MacroBacktraceLimit = 0;
+ TemplateBacktraceLimit = DefaultTemplateBacktraceLimit;
+ MacroBacktraceLimit = DefaultMacroBacktraceLimit;
}
};
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=103162&r1=103161&r2=103162&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed May 5 23:55:18 2010
@@ -21,7 +21,6 @@
#include "clang/Driver/Options.h"
#include "clang/Driver/ToolChain.h"
#include "clang/Driver/Util.h"
-#include "clang/Frontend/DiagnosticOptions.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"
@@ -1083,20 +1082,16 @@
else
CmdArgs.push_back("19");
- CmdArgs.push_back("-fmacro-backtrace-limit");
- if (Arg *A = Args.getLastArg(options::OPT_fmacro_backtrace_limit_EQ))
+ if (Arg *A = Args.getLastArg(options::OPT_fmacro_backtrace_limit_EQ)) {
+ CmdArgs.push_back("-fmacro-backtrace-limit");
CmdArgs.push_back(A->getValue(Args));
- else
- CmdArgs.push_back(Args.MakeArgString(
- llvm::Twine(DiagnosticOptions::DefaultMacroBacktraceLimit)));
-
- CmdArgs.push_back("-ftemplate-backtrace-limit");
- if (Arg *A = Args.getLastArg(options::OPT_ftemplate_backtrace_limit_EQ))
+ }
+
+ if (Arg *A = Args.getLastArg(options::OPT_ftemplate_backtrace_limit_EQ)) {
+ CmdArgs.push_back("-ftemplate-backtrace-limit");
CmdArgs.push_back(A->getValue(Args));
- else
- CmdArgs.push_back(Args.MakeArgString(
- llvm::Twine(DiagnosticOptions::DefaultTemplateBacktraceLimit)));
-
+ }
+
// Pass -fmessage-length=.
CmdArgs.push_back("-fmessage-length");
if (Arg *A = Args.getLastArg(options::OPT_fmessage_length_EQ)) {
More information about the cfe-commits
mailing list