From ba3c6681f000e6af1f11b4c212cc9a6e5e335985 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 5 Nov 2009 19:13:29 +0000 Subject: [PATCH] Enable debug info for global variables at -O1+ llvm-svn: 86156 --- clang/lib/CodeGen/CGDebugInfo.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 1b01e1537b42..714dde059be2 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1362,13 +1362,6 @@ void CGDebugInfo::EmitDeclareOfArgVariable(const VarDecl *Decl, llvm::Value *AI, void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, const VarDecl *Decl) { - // Do not emit variable debug information while generating optimized code. - // The llvm optimizer and code generator are not yet ready to support - // optimized code debugging. - const CompileOptions &CO = M->getCompileOpts(); - if (CO.OptimizationLevel) - return; - // Create global variable debug descriptor. llvm::DICompileUnit Unit = getOrCreateCompileUnit(Decl->getLocation()); SourceManager &SM = M->getContext().getSourceManager();