]> granicus.if.org Git - clang/commitdiff
indentation and formatting
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 01:20:05 +0000 (01:20 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 01:20:05 +0000 (01:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64871 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/clang.cpp

index 65f0320011a332ff52e4960d15a818c82cd792b3..70bc5b19ab5c573dc521c789fb636ff38560309a 100644 (file)
@@ -1247,65 +1247,65 @@ static void InitializeCompileOptions(CompileOptions &Opts) {
 /// CreateASTConsumer - Create the ASTConsumer for the corresponding program
 ///  action.  These consumers can operate on both ASTs that are freshly
 ///  parsed from source files as well as those deserialized from Bitcode.
-static ASTConsumerCreateASTConsumer(const std::string& InFile,
+static ASTConsumer *CreateASTConsumer(const std::string& InFile,
                                       Diagnostic& Diag, FileManager& FileMgr, 
                                       const LangOptions& LangOpts,
                                       Preprocessor *PP,
                                       PreprocessorFactory *PPF) {
   switch (ProgAction) {
-    default:
-      return NULL;
-      
-    case ASTPrint:
-      return CreateASTPrinter();
-      
-    case ASTDump:
-      return CreateASTDumper();
-      
-    case ASTView:
-      return CreateASTViewer();   
+  default:
+    return NULL;
+    
+  case ASTPrint:
+    return CreateASTPrinter();
+    
+  case ASTDump:
+    return CreateASTDumper();
+    
+  case ASTView:
+    return CreateASTViewer();   
 
-    case PrintDeclContext:
-      return CreateDeclContextPrinter();
-      
-    case EmitHTML:
-      return CreateHTMLPrinter(OutputFile, Diag, PP, PPF);
+  case PrintDeclContext:
+    return CreateDeclContextPrinter();
+    
+  case EmitHTML:
+    return CreateHTMLPrinter(OutputFile, Diag, PP, PPF);
 
-    case InheritanceView:
-      return CreateInheritanceViewer(InheritanceViewCls);
-      
-    case TestSerialization:
-      return CreateSerializationTest(Diag, FileMgr);
-      
-    case EmitAssembly:
-    case EmitLLVM:
-    case EmitBC: {
-      BackendAction Act;
-      if (ProgAction == EmitAssembly) {
-        Act = Backend_EmitAssembly;
-      } else if (ProgAction == EmitLLVM) {
-        Act = Backend_EmitLL;
-      } else {
-        Act = Backend_EmitBC;        
-      }
-      CompileOptions Opts;
-      InitializeCompileOptions(Opts);
-      return CreateBackendConsumer(Act, Diag, LangOpts, Opts, 
-                                   InFile, OutputFile, GenerateDebugInfo);
-    }
+  case InheritanceView:
+    return CreateInheritanceViewer(InheritanceViewCls);
+    
+  case TestSerialization:
+    return CreateSerializationTest(Diag, FileMgr);
+    
+  case EmitAssembly:
+  case EmitLLVM:
+  case EmitBC: {
+    BackendAction Act;
+    if (ProgAction == EmitAssembly)
+      Act = Backend_EmitAssembly;
+    else if (ProgAction == EmitLLVM)
+      Act = Backend_EmitLL;
+    else
+      Act = Backend_EmitBC;
+    
+    CompileOptions Opts;
+    InitializeCompileOptions(Opts);
+    return CreateBackendConsumer(Act, Diag, LangOpts, Opts, 
+                                 InFile, OutputFile, GenerateDebugInfo);
+  }
 
-    case SerializeAST:
-      // FIXME: Allow user to tailor where the file is written.
-      return CreateASTSerializer(InFile, OutputFile, Diag);
-      
-    case RewriteObjC:
-      return CreateCodeRewriterTest(InFile, OutputFile, Diag, LangOpts);
+  case SerializeAST:
+    // FIXME: Allow user to tailor where the file is written.
+    return CreateASTSerializer(InFile, OutputFile, Diag);
+    
+  case RewriteObjC:
+    return CreateCodeRewriterTest(InFile, OutputFile, Diag, LangOpts);
 
-    case RewriteBlocks:
-      return CreateBlockRewriter(InFile, OutputFile, Diag, LangOpts);
-      
-    case RunAnalysis:
-      return CreateAnalysisConsumer(Diag, PP, PPF, LangOpts, OutputFile);
+  case RewriteBlocks:
+    return CreateBlockRewriter(InFile, OutputFile, Diag, LangOpts);
+    
+  case RunAnalysis:
+    return CreateAnalysisConsumer(Diag, PP, PPF, LangOpts, OutputFile);
   }
 }