[llvm-branch-commits] [cfe-branch] r101590 - in /cfe/branches/Apple/williamson: lib/Frontend/CompilerInstance.cpp tools/driver/cc1_main.cpp tools/driver/driver.cpp

Daniel Dunbar daniel at zuster.org
Fri Apr 16 17:32:33 PDT 2010


Author: ddunbar
Date: Fri Apr 16 19:32:33 2010
New Revision: 101590

URL: http://llvm.org/viewvc/llvm-project?rev=101590&view=rev
Log:
Adapt branch for use with Morbo.

Modified:
    cfe/branches/Apple/williamson/lib/Frontend/CompilerInstance.cpp
    cfe/branches/Apple/williamson/tools/driver/cc1_main.cpp
    cfe/branches/Apple/williamson/tools/driver/driver.cpp

Modified: cfe/branches/Apple/williamson/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/Frontend/CompilerInstance.cpp?rev=101590&r1=101589&r2=101590&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/branches/Apple/williamson/lib/Frontend/CompilerInstance.cpp Fri Apr 16 19:32:33 2010
@@ -481,9 +481,12 @@
   if (getFrontendOpts().ShowTimers)
     createFrontendTimer();
 
+  // Disabled for use with older LLVM.
+#if 0
   if (getFrontendOpts().ShowStats)
     llvm::EnableStatistics();
-    
+#endif
+
   for (unsigned i = 0, e = getFrontendOpts().Inputs.size(); i != e; ++i) {
     const std::string &InFile = getFrontendOpts().Inputs[i].second;
 

Modified: cfe/branches/Apple/williamson/tools/driver/cc1_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/tools/driver/cc1_main.cpp?rev=101590&r1=101589&r2=101590&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/tools/driver/cc1_main.cpp (original)
+++ cfe/branches/Apple/williamson/tools/driver/cc1_main.cpp Fri Apr 16 19:32:33 2010
@@ -259,10 +259,18 @@
   if (!Clang->hasDiagnostics())
     return 1;
 
+  // Conditionalized for use with older LLVM.
+#if 0
   // Set an error handler, so that any LLVM backend diagnostics go through our
   // error handler.
   llvm::install_fatal_error_handler(LLVMErrorHandler,
                                   static_cast<void*>(&Clang->getDiagnostics()));
+#else
+  // Set an error handler, so that any LLVM backend diagnostics go through our
+  // error handler.
+  llvm::llvm_install_error_handler(LLVMErrorHandler,
+                                  static_cast<void*>(&Clang->getDiagnostics()));
+#endif
 
   DiagsBuffer.FlushDiagnostics(Clang->getDiagnostics());
 
@@ -287,14 +295,20 @@
     }
   }
 
+  // Disabled for use with older LLVM.
+#if 0
   // If any timers were active but haven't been destroyed yet, print their
   // results now.  This happens in -disable-free mode.
   llvm::TimerGroup::printAll(llvm::errs());
+#endif
   
   // When running with -disable-free, don't do any destruction or shutdown.
   if (Clang->getFrontendOpts().DisableFree) {
+    // Disabled for use with older LLVM.
+#if 0
     if (Clang->getFrontendOpts().ShowStats)
       llvm::PrintStatistics();
+#endif
     Clang.take();
     return !Success;
   }

Modified: cfe/branches/Apple/williamson/tools/driver/driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/tools/driver/driver.cpp?rev=101590&r1=101589&r2=101590&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/tools/driver/driver.cpp (original)
+++ cfe/branches/Apple/williamson/tools/driver/driver.cpp Fri Apr 16 19:32:33 2010
@@ -274,10 +274,12 @@
   if (C.get())
     Res = TheDriver.ExecuteCompilation(*C);
 
-  
+  // Disabled for use with older LLVM.
+#if 0
   // If any timers were active but haven't been destroyed yet, print their
   // results now.  This happens in -disable-free mode.
   llvm::TimerGroup::printAll(llvm::errs());
+#endif
   
   llvm::llvm_shutdown();
 





More information about the llvm-branch-commits mailing list