diff options
author | Mike Stump <mrs@apple.com> | 2009-10-01 22:29:41 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-10-01 22:29:41 +0000 |
commit | b289b3f324eb10d416b87080e39b315f6c17a695 (patch) | |
tree | 5072d3795ef33801815377e56042a5c5baff1d26 /lib/CodeGen/CGDebugInfo.cpp | |
parent | f8c3ad7653697ae91634bda56cb0e3d6eac2ef45 (diff) |
Implement a FIXME. This improves codegen just a tad.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 645125667c..0b386841f1 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -1088,7 +1088,7 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag, // The llvm optimizer and code generator are not yet ready to support // optimized code debugging. const CompileOptions &CO = M->getCompileOpts(); - if (CO.OptimizationLevel) + if (CO.OptimizationLevel || Builder.GetInsertBlock() == 0) return; uint64_t XOffset = 0; @@ -1269,7 +1269,7 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag, Decl->getNameAsString(), Unit, Line, Ty, addr); // Insert an llvm.dbg.declare into the current block. - DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock()); + DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertPoint()); } void CGDebugInfo::EmitDeclareOfAutoVariable(const VarDecl *Decl, |