aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-09 21:54:33 +0000
committerChris Lattner <sabre@nondot.org>2010-01-09 21:54:33 +0000
commit124fca533d9fef2e3f6359283909bd342b5f5f26 (patch)
tree33e2e79e7fd8d792fbf555cd7be5827ad521fedc /lib/Frontend/CompilerInvocation.cpp
parent4824fcdf37139efa57466a2a5753dd6e5e792ef8 (diff)
implement -ftabstop=width, patch by Christian Adåker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 8817469cbb..375c75c47e 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -222,6 +222,10 @@ static void DiagnosticOptsToArgs(const DiagnosticOptions &Opts,
Res.push_back("-verify");
if (Opts.ShowOptionNames)
Res.push_back("-fdiagnostics-show-option");
+ if (Opts.TabStop != 8) {
+ Res.push_back("-ftabstop");
+ Res.push_back(llvm::utostr(Opts.TabStop));
+ }
if (Opts.MessageLength) {
Res.push_back("-fmessage-length");
Res.push_back(llvm::utostr(Opts.MessageLength));
@@ -804,6 +808,7 @@ static void ParseDiagnosticArgs(DiagnosticOptions &Opts, ArgList &Args,
Opts.ShowOptionNames = Args.hasArg(OPT_fdiagnostics_show_option);
Opts.ShowSourceRanges = Args.hasArg(OPT_fdiagnostics_print_source_range_info);
Opts.VerifyDiagnostics = Args.hasArg(OPT_verify);
+ Opts.TabStop = getLastArgIntValue(Args, OPT_ftabstop, 8, Diags);
Opts.MessageLength = getLastArgIntValue(Args, OPT_fmessage_length, 0, Diags);
Opts.DumpBuildInformation = getLastArgValue(Args, OPT_dump_build_information);
Opts.Warnings = getAllArgValues(Args, OPT_W);