aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-02-08 03:55:35 +0000
committerAnders Carlsson <andersca@mac.com>2009-02-08 03:55:35 +0000
commitd66a9f9019c00d889990c947e16a8f019aa2c1f8 (patch)
tree49fbf8a7465058c166b26ba67229d7e4e0fdd64e /lib/CodeGen/CodeGenFunction.h
parent6fc559136b8ef98bfb824a0fd49df385405f2879 (diff)
Split some functions up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 9eae28ca2a..fa23308176 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -249,16 +249,19 @@ private:
/// label.
void EmitStackUpdate(const LabelStmt &S);
+ typedef std::vector<llvm::BasicBlock *> BlockVector;
+ typedef std::vector<llvm::BranchInst *> BranchFixupsVector;
+
struct CleanupEntry {
/// CleanupBlock - The block of code that does the actual cleanup.
llvm::BasicBlock *CleanupBlock;
/// Blocks - Basic blocks that were emitted in the current cleanup scope.
- std::vector<llvm::BasicBlock *> Blocks;
+ BlockVector Blocks;
/// BranchFixups - Branch instructions to basic blocks that haven't been
/// inserted into the current function yet.
- std::vector<llvm::BranchInst*> BranchFixups;
+ BranchFixupsVector BranchFixups;
explicit CleanupEntry(llvm::BasicBlock *cb)
: CleanupBlock(cb) {}
@@ -267,7 +270,6 @@ private:
assert(Blocks.empty() && "Did not empty blocks!");
assert(BranchFixups.empty() && "Did not empty branch fixups!");
}
-
};
/// CleanupEntries - Stack of cleanup entries.
@@ -789,6 +791,13 @@ private:
/// EmitCleanupBlock - emits a single cleanup block.
void EmitCleanupBlock();
+ llvm::BasicBlock *PopCleanupBlock(BlockVector& Blocks,
+ BranchFixupsVector& BranchFixups);
+
+ void FixupBranches(llvm::BasicBlock *CleanupBlock,
+ const BlockVector& Blocks,
+ BranchFixupsVector& BranchFixups);
+
/// AddBranchFixup - adds a branch instruction to the list of fixups for the
/// current cleanup scope.
void AddBranchFixup(llvm::BranchInst *BI);