r181959 - Clarify comment.

Adrian Prantl aprantl at apple.com
Wed May 15 17:41:31 PDT 2013


Author: adrian
Date: Wed May 15 19:41:31 2013
New Revision: 181959

URL: http://llvm.org/viewvc/llvm-project?rev=181959&view=rev
Log:
Clarify comment.

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

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=181959&r1=181958&r2=181959&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Wed May 15 19:41:31 2013
@@ -192,10 +192,12 @@ void CodeGenFunction::FinishFunction(Sou
   bool OnlySimpleReturnStmts = NumSimpleReturnExprs > 0
     && NumSimpleReturnExprs == NumReturnExprs;
   // If the function contains only a simple return statement, the
-  // cleanup code may become the first breakpoint in the function. To
-  // be safe, set the debug location for it to the location of the
-  // return statement.  Otherwise point it to end of the function's
-  // lexical scope.
+  // location before the cleanup code becomes the last useful
+  // breakpoint in the function, because the simple return expression
+  // will be evaluated after the cleanup code. To be safe, set the
+  // debug location for cleanup code to the location of the return
+  // statement. Otherwise the cleanup code should be at the end of the
+  // function's lexical scope.
   if (CGDebugInfo *DI = getDebugInfo()) {
     if (OnlySimpleReturnStmts)
        DI->EmitLocation(Builder, LastStopPoint);





More information about the cfe-commits mailing list