Split some functions up
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64069 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 9eae28c..fa23308 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -249,16 +249,19 @@
/// 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 @@
assert(Blocks.empty() && "Did not empty blocks!");
assert(BranchFixups.empty() && "Did not empty branch fixups!");
}
-
};
/// CleanupEntries - Stack of cleanup entries.
@@ -789,6 +791,13 @@
/// 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);