diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-12 01:50:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-12 01:50:58 +0000 |
commit | 05e7c6d29c65c43245c49cdbde10dba8270fa204 (patch) | |
tree | 73cc5e366b5ad6cbcf9aed3e4e1100d875fefea9 | |
parent | 3102c83f6eac0cbbd698471173672c3e47a6914c (diff) |
for now, disable all debug info generation at -O1 and above. This mirrors
similar logic in llvm-gcc and will hopefully be fixed soon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64349 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | Driver/Backend.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Driver/Backend.cpp b/Driver/Backend.cpp index 328f08087b..a0e102af09 100644 --- a/Driver/Backend.cpp +++ b/Driver/Backend.cpp @@ -369,6 +369,13 @@ ASTConsumer *clang::CreateBackendConsumer(BackendAction Action, const std::string& InFile, const std::string& OutFile, bool GenerateDebugInfo) { + // 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) + GenerateDebugInfo = false; + + return new BackendConsumer(Action, Diags, Features, CompileOpts, InFile, OutFile, GenerateDebugInfo); } |