[llvm-commits] [dragonegg] r104440 - /dragonegg/trunk/llvm-debug.cpp

Duncan Sands baldrick at free.fr
Sat May 22 04:45:14 PDT 2010


Author: baldrick
Date: Sat May 22 06:45:14 2010
New Revision: 104440

URL: http://llvm.org/viewvc/llvm-project?rev=104440&view=rev
Log:
Port commit 103734 (dpatel) from llvm-gcc:
Update comments.

Modified:
    dragonegg/trunk/llvm-debug.cpp

Modified: dragonegg/trunk/llvm-debug.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-debug.cpp?rev=104440&r1=104439&r2=104440&view=diff
==============================================================================
--- dragonegg/trunk/llvm-debug.cpp (original)
+++ dragonegg/trunk/llvm-debug.cpp Sat May 22 06:45:14 2010
@@ -244,8 +244,7 @@
   return StringRef(StrPtr);
 }
 
-/// EmitFunctionStart - Constructs the debug code for entering a function -
-/// "llvm.dbg.func.start."
+/// EmitFunctionStart - Constructs the debug code for entering a function.
 void DebugInfo::EmitFunctionStart(tree FnDecl, Function *Fn,
                                   BasicBlock *CurBB) {
 
@@ -370,8 +369,7 @@
   return getOrCreateFile(main_input_filename);
 }
 
-/// EmitFunctionEnd - Constructs the debug code for exiting a declarative
-/// region - "llvm.dbg.region.end."
+/// EmitFunctionEnd - Pop the region stack and reset current lexical block.
 void DebugInfo::EmitFunctionEnd(BasicBlock *CurBB, bool EndFunction) {
   assert(!RegionStack.empty() && "Region stack mismatch, stack empty!");
   RegionStack.pop_back();
@@ -385,7 +383,6 @@
 }
 
 /// EmitDeclare - Constructs the debug code for allocation of a new variable.
-/// region - "llvm.dbg.declare."
 void DebugInfo::EmitDeclare(tree decl, unsigned Tag, const char *Name,
                             tree type, Value *AI, LLVMBuilder &Builder) {
 
@@ -412,14 +409,13 @@
                                 Name, getOrCreateFile(Loc.file),
                                 Loc.line, Ty);
 
-  // Insert an llvm.dbg.declare into the current block.
-  Instruction *Call = DebugFactory.InsertDeclare(AI, D,
-                                                 Builder.GetInsertBlock());
+  Instruction *Call =
+    DebugFactory.InsertDeclare(AI, D, Builder.GetInsertBlock());
+
   Call->setDebugLoc(DebugLoc::get(CurLineNo, 0, VarScope));
 }
 
-/// EmitStopPoint - Emit a call to llvm.dbg.stoppoint to indicate a change of
-/// source line - "llvm.dbg.stoppoint."  Now enabled at -O.
+/// EmitStopPoint - Set current source location. 
 void DebugInfo::EmitStopPoint(Function *Fn, BasicBlock *CurBB,
                               LLVMBuilder &Builder) {
   // Don't bother if things are the same as last time.





More information about the llvm-commits mailing list