Enable debug info for global variables at -O1+

llvm-svn: 86156
This commit is contained in:
Devang Patel 2009-11-05 19:13:29 +00:00
parent 17feb2a9ee
commit ba3c6681f0
1 changed files with 0 additions and 7 deletions

View 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();