]> granicus.if.org Git - clang/commitdiff
Enable debug info for global variables at -O1+
authorDevang Patel <dpatel@apple.com>
Thu, 5 Nov 2009 19:13:29 +0000 (19:13 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 5 Nov 2009 19:13:29 +0000 (19:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86156 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 1b01e1537b42fbc97d5660a8daed38187549a858..714dde059be2dfac83447fc6bca7d0405a76c482 100644 (file)
@@ -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();