]> granicus.if.org Git - clang/commitdiff
clang-cc: Start coalescing "frontend" options.
authorDaniel Dunbar <daniel@zuster.org>
Wed, 11 Nov 2009 08:13:47 +0000 (08:13 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 11 Nov 2009 08:13:47 +0000 (08:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86820 91177308-0d34-0410-b5e6-96231b3b80d8

tools/clang-cc/clang-cc.cpp

index 2177fcdef91c6662c153531716fee7e6d1105b63..5d8a74df03e2b9176e60b8e3b03f42ddd0fe19ce 100644 (file)
@@ -202,12 +202,6 @@ ProgAction(llvm::cl::desc("Choose output type:"), llvm::cl::ZeroOrMore,
              clEnumValEnd));
 
 
-static llvm::cl::opt<std::string>
-OutputFile("o",
- llvm::cl::value_desc("path"),
- llvm::cl::desc("Specify output file"));
-
-
 enum CodeCompletionPrinter {
   CCP_Debug,
   CCP_CIndex
@@ -249,14 +243,6 @@ static CodeCompleteConsumer *BuildPrintingCodeCompleter(Sema &S, void *) {
   return 0;
 }
 
-//===----------------------------------------------------------------------===//
-// PTH.
-//===----------------------------------------------------------------------===//
-
-static llvm::cl::opt<std::string>
-TokenCache("token-cache", llvm::cl::value_desc("path"),
-           llvm::cl::desc("Use specified token cache file"));
-
 //===----------------------------------------------------------------------===//
 // C++ Visualization.
 //===----------------------------------------------------------------------===//
@@ -270,11 +256,23 @@ InheritanceViewCls("cxx-inheritance-view",
 // Frontend Options
 //===----------------------------------------------------------------------===//
 
+static llvm::cl::list<std::string>
+InputFilenames(llvm::cl::Positional, llvm::cl::desc("<input files>"));
+
+static llvm::cl::opt<std::string>
+OutputFile("o",
+ llvm::cl::value_desc("path"),
+ llvm::cl::desc("Specify output file"));
+
 static llvm::cl::opt<bool>
 TimeReport("ftime-report",
            llvm::cl::desc("Print the amount of time each "
                           "phase of compilation takes"));
 
+static llvm::cl::opt<std::string>
+TokenCache("token-cache", llvm::cl::value_desc("path"),
+           llvm::cl::desc("Use specified token cache file"));
+
 static llvm::cl::opt<bool>
 VerifyDiagnostics("verify",
                   llvm::cl::desc("Verify emitted diagnostics and warnings"));
@@ -643,8 +641,6 @@ static void SetUpBuildDumpLog(const DiagnosticOptions &DiagOpts,
   DiagClient.reset(new ChainedDiagnosticClient(DiagClient.take(), Logger));
 }
 
-
-
 //===----------------------------------------------------------------------===//
 // Main driver
 //===----------------------------------------------------------------------===//
@@ -888,9 +884,8 @@ static void ProcessInputFile(const CompilerInvocation &CompOpts,
   }
 
   if (FixItAtLocations.size() > 0) {
-    // Even without the "-fixit" flag, with may have some specific
-    // locations where the user has requested fixes. Process those
-    // locations now.
+    // Even without the "-fixit" flag, we may have some specific locations where
+    // the user has requested fixes. Process those locations now.
     if (!FixItRewrite)
       FixItRewrite = new FixItRewriter(PP.getDiagnostics(),
                                        PP.getSourceManager(),
@@ -1144,9 +1139,6 @@ static void ProcessASTInputFile(const CompilerInvocation &CompOpts,
     OutPath.eraseFromDisk();
 }
 
-static llvm::cl::list<std::string>
-InputFilenames(llvm::cl::Positional, llvm::cl::desc("<input files>"));
-
 static void LLVMErrorHandler(void *UserData, const std::string &Message) {
   Diagnostic &Diags = *static_cast<Diagnostic*>(UserData);