[cfe-commits] r68972 - /cfe/trunk/tools/clang-cc/Backend.cpp

Daniel Dunbar daniel at zuster.org
Mon Apr 13 11:03:40 PDT 2009


Author: ddunbar
Date: Mon Apr 13 13:03:39 2009
New Revision: 68972

URL: http://llvm.org/viewvc/llvm-project?rev=68972&view=rev
Log:
Revert 68936, LLVM still isn't ready to handle debug info + optimization.

Modified:
    cfe/trunk/tools/clang-cc/Backend.cpp

Modified: cfe/trunk/tools/clang-cc/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/Backend.cpp?rev=68972&r1=68971&r2=68972&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/Backend.cpp (original)
+++ cfe/trunk/tools/clang-cc/Backend.cpp Mon Apr 13 13:03:39 2009
@@ -425,6 +425,12 @@
                                           const CompileOptions &CompileOpts,
                                           const std::string& InFile,
                                           const std::string& OutFile) {
+  // FIXME: If optimizing, disable all debug info generation.  The LLVM
+  // optimizer and backend is not ready to handle it when optimizations
+  // are enabled.
+  if (CompileOpts.OptimizationLevel > 0)
+    const_cast<CompileOptions&>(CompileOpts).DebugInfo = false;
+    
   return new BackendConsumer(Action, Diags, LangOpts, CompileOpts,
                              InFile, OutFile);  
 }





More information about the cfe-commits mailing list