Enable debug info for local variables at -O1+.

llvm-svn: 102398
This commit is contained in:
Devang Patel 2010-04-26 23:28:46 +00:00
parent 25f85947a3
commit 42fb6f8b9a
1 changed files with 1 additions and 12 deletions

View File

@ -1463,13 +1463,6 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
llvm::Value *Storage, CGBuilderTy &Builder) {
assert(!RegionStack.empty() && "Region stack mismatch, stack empty!");
// 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 CodeGenOptions &CGO = CGM.getCodeGenOpts();
if (CGO.OptimizationLevel)
return;
llvm::DIFile Unit = getOrCreateFile(VD->getLocation());
llvm::DIType Ty;
uint64_t XOffset = 0;
@ -1513,11 +1506,7 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag,
const ValueDecl *VD = BDRE->getDecl();
assert(!RegionStack.empty() && "Region stack mismatch, stack empty!");
// 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 CodeGenOptions &CGO = CGM.getCodeGenOpts();
if (CGO.OptimizationLevel || Builder.GetInsertBlock() == 0)
if (Builder.GetInsertBlock() == 0)
return;
uint64_t XOffset = 0;