diff options
| author | Adrian Prantl <aprantl@apple.com> | 2013-05-16 00:41:31 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2013-05-16 00:41:31 +0000 |
| commit | 3081c6fe13fbefc398e685a34fe7ba644c209ecd (patch) | |
| tree | e744104b492c933fb363de3e0dd7d7aa424db0e6 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 59f0a5a5481a6dcfafd092dd944e6cfb7d146d4c (diff) | |
| download | clang-3081c6fe13fbefc398e685a34fe7ba644c209ecd.tar.gz clang-3081c6fe13fbefc398e685a34fe7ba644c209ecd.tar.bz2 clang-3081c6fe13fbefc398e685a34fe7ba644c209ecd.tar.xz | |
Clarify comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index 3e04ae7d15..0986ae7d6a 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -192,10 +192,12 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { 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); |
