summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-04-26 23:28:46 +0000
committerDevang Patel <dpatel@apple.com>2010-04-26 23:28:46 +0000
commit42fb6f8b9ac4a81da53b67514c5ae1792c98eba6 (patch)
tree6d7844b952b884461083cb24f29054689e80e6c0 /clang/lib/CodeGen/CGDebugInfo.cpp
parent25f85947a3ac81a19eb1e07a75cca932c23e7757 (diff)
downloadbcm5719-llvm-42fb6f8b9ac4a81da53b67514c5ae1792c98eba6.tar.gz
bcm5719-llvm-42fb6f8b9ac4a81da53b67514c5ae1792c98eba6.zip
Enable debug info for local variables at -O1+.
llvm-svn: 102398
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 933dc45229a..d11ea1b70fb 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -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;
OpenPOWER on IntegriCloud