[cfe-commits] r86750 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Devang Patel dpatel at apple.com
Tue Nov 10 15:07:24 PST 2009


Author: dpatel
Date: Tue Nov 10 17:07:24 2009
New Revision: 86750

URL: http://llvm.org/viewvc/llvm-project?rev=86750&view=rev
Log:
Attach location info with llvm.dbg.declare.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=86750&r1=86749&r2=86750&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Nov 10 17:07:24 2009
@@ -941,6 +941,7 @@
 
   // Push function on region stack.
   RegionStack.push_back(SP);
+  EmitStopPoint(Fn, Builder);
 }
 
 
@@ -1165,7 +1166,9 @@
     DebugFactory.CreateVariable(Tag, RegionStack.back(),Decl->getNameAsString(),
                                 Unit, Line, Ty);
   // Insert an llvm.dbg.declare into the current block.
-  DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock());
+  llvm::Instruction *Call = 
+    DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock());
+  Builder.SetDebugLocation(Call);
 }
 
 /// EmitDeclare - Emit local variable declaration debug info.





More information about the cfe-commits mailing list