diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2008-08-05 23:33:20 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2008-08-05 23:33:20 +0000 |
| commit | b5fc3c300a54d9380303f5a6923a24db9eab06b3 (patch) | |
| tree | 344f345f45d49939294d438f86d9269f5e2dd2ee /clang/Driver/clang.cpp | |
| parent | 829e988899d92ded0c55228976ff80d278fda8d2 (diff) | |
| download | bcm5719-llvm-b5fc3c300a54d9380303f5a6923a24db9eab06b3.tar.gz bcm5719-llvm-b5fc3c300a54d9380303f5a6923a24db9eab06b3.zip | |
add a libDriver, for now only move the text diangostics stuff from Driver to there
llvm-svn: 54383
Diffstat (limited to 'clang/Driver/clang.cpp')
| -rw-r--r-- | clang/Driver/clang.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/clang/Driver/clang.cpp b/clang/Driver/clang.cpp index 56389dfb693..1aa7651aa6f 100644 --- a/clang/Driver/clang.cpp +++ b/clang/Driver/clang.cpp @@ -24,9 +24,9 @@ #include "clang.h" #include "ASTConsumers.h" -#include "TextDiagnosticBuffer.h" -#include "TextDiagnosticPrinter.h" #include "HTMLDiagnostics.h" +#include "clang/Driver/TextDiagnosticBuffer.h" +#include "clang/Driver/TextDiagnosticPrinter.h" #include "clang/Analysis/PathDiagnostic.h" #include "clang/AST/TranslationUnit.h" #include "clang/CodeGen/ModuleBuilder.h" @@ -143,6 +143,16 @@ HTMLDiag("html-diags", llvm::cl::desc("Generate HTML to report diagnostics"), llvm::cl::value_desc("HTML directory")); +static llvm::cl::opt<bool> +NoShowColumn("fno-show-column", + llvm::cl::desc("Do not include column number on diagnostics")); + +static llvm::cl::opt<bool> +NoCaretDiagnostics("fno-caret-diagnostics", + llvm::cl::desc("Do not include source line and caret with" + " diagnostics")); + + //===----------------------------------------------------------------------===// // Analyzer Options //===----------------------------------------------------------------------===// @@ -426,7 +436,7 @@ ObjCExclusiveGC("fobjc-gc-only", static llvm::cl::opt<bool> ObjCEnableGC("fobjc-gc", - llvm::cl::desc("Enable Objective-C garbage collection")); + llvm::cl::desc("Enable Objective-C garbage collection")); void InitializeGCMode(LangOptions &Options) { if (ObjCExclusiveGC) @@ -1392,7 +1402,8 @@ int main(int argc, char **argv) { else { // Use Text diagnostics. if (!VerifyDiagnostics) { // Print diagnostics to stderr by default. - TextDiagClient = new TextDiagnosticPrinter(); + TextDiagClient = new TextDiagnosticPrinter(!NoShowColumn, + !NoCaretDiagnostics); } else { // When checking diagnostics, just buffer them up. TextDiagClient = new TextDiagnosticBuffer(); |

