[cfe-commits] r76362 - in /cfe/trunk/lib/CodeGen: CGDecl.cpp CGStmt.cpp
Daniel Dunbar
daniel at zuster.org
Sun Jul 19 00:03:11 PDT 2009
Author: ddunbar
Date: Sun Jul 19 02:03:11 2009
New Revision: 76362
URL: http://llvm.org/viewvc/llvm-project?rev=76362&view=rev
Log:
Fix thinko.
Modified:
cfe/trunk/lib/CodeGen/CGDecl.cpp
cfe/trunk/lib/CodeGen/CGStmt.cpp
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=76362&r1=76361&r2=76362&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Sun Jul 19 02:03:11 2009
@@ -325,10 +325,7 @@
// Emit debug info for local var declaration.
if (CGDebugInfo *DI = getDebugInfo()) {
- // FIXME: Remove this once debug info isn't modeled as instructions.
- EnsureInsertPoint();
-
- EmitStopPoint(S);
+ assert(HaveInsertPoint() && "Unexpected unreachable point!");
DI->setLocation(D.getLocation());
if (Target.useGlobalsForAutomaticVariables()) {
Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=76362&r1=76361&r2=76362&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Sun Jul 19 02:03:11 2009
@@ -525,6 +525,13 @@
}
void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) {
+ // As long as debug info is modeled with instructions, we have to ensure we
+ // have a place to insert here and write the stop point here.
+ if (getDebugInfo()) {
+ EnsureInsertPoint();
+ EmitStopPoint(&S);
+ }
+
for (DeclStmt::const_decl_iterator I = S.decl_begin(), E = S.decl_end();
I != E; ++I)
EmitDecl(**I);
More information about the cfe-commits
mailing list