diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-05-03 00:44:13 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-05-03 00:44:13 +0000 |
commit | 44f38013e22475e122e6847de8642d1dd18d497d (patch) | |
tree | 071b1b925da4a93c5577638f2ad38f2e9b18d631 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | f12d9d93feacad93ff99dd2eb700c9ebee53bb34 (diff) | |
download | bcm5719-llvm-44f38013e22475e122e6847de8642d1dd18d497d.tar.gz bcm5719-llvm-44f38013e22475e122e6847de8642d1dd18d497d.zip |
Attempt to un-break the gdb buildbot.
- Use the debug location of the return expression for the cleanup code
if the return expression is trivially evaluatable, regardless of the
number of stop points in the function.
- Ensure that any EH code in the cleanup still gets the line number of
the closing } of the lexical scope.
- Added a testcase with EH in the cleanup.
rdar://problem/13442648
llvm-svn: 180982
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 17df1dad3ef..7c6e8d176b6 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -784,7 +784,9 @@ public: /// PopCleanupBlock - Will pop the cleanup entry on the stack and /// process all branch fixups. - void PopCleanupBlock(bool FallThroughIsBranchThrough = false); + /// \param EHLoc - Optional debug location for EH code. + void PopCleanupBlock(bool FallThroughIsBranchThrough = false, + SourceLocation EHLoc=SourceLocation()); /// DeactivateCleanupBlock - Deactivates the given cleanup block. /// The block cannot be reactivated. Pops it if it's the top of the @@ -905,7 +907,9 @@ public: /// PopCleanupBlocks - Takes the old cleanup stack size and emits /// the cleanup blocks that have been added. - void PopCleanupBlocks(EHScopeStack::stable_iterator OldCleanupStackSize); + /// \param EHLoc - Optional debug location for EH code. + void PopCleanupBlocks(EHScopeStack::stable_iterator OldCleanupStackSize, + SourceLocation EHLoc=SourceLocation()); void ResolveBranchFixups(llvm::BasicBlock *Target); @@ -1206,14 +1210,14 @@ private: /// lazily by getUnreachableBlock(). llvm::BasicBlock *UnreachableBlock; - /// Counts of the number of distinct breakpoint locations in this function. - unsigned NumStopPoints; + /// Counts of the number return expressions in the function. + unsigned NumReturnExprs; /// Count the number of simple (constant) return expressions in the function. unsigned NumSimpleReturnExprs; - /// The first debug location (breakpoint) in the function. - SourceLocation FirstStopPoint; + /// The last regular (non-return) debug location (breakpoint) in the function. + SourceLocation LastStopPoint; public: /// A scope within which we are constructing the fields of an object which |