diff options
author | Anders Carlsson <andersca@mac.com> | 2009-02-07 22:53:43 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-02-07 22:53:43 +0000 |
commit | 6ccc47698d0311ddabf32fa0f6db8e4f09ac96f8 (patch) | |
tree | 459dcc26b98e35328aaac56cbcd4ed6b3e7fde0d /lib/CodeGen/CodeGenFunction.cpp | |
parent | 7a9bb52171f962d51ab13c1e012d2236feb9558d (diff) |
Add plumbing for the cleanup stack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64043 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index f5a802f0b7..4ba4d600f8 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -512,3 +512,12 @@ llvm::Value* CodeGenFunction::EmitVAListRef(const Expr* E) { } return EmitLValue(E).getAddress(); } + +llvm::BasicBlock *CodeGenFunction::CreateCleanupBlock() +{ + llvm::BasicBlock *CleanupBlock = createBasicBlock("cleanup"); + + CleanupEntries.push_back(CleanupEntry(CleanupBlock)); + + return CleanupBlock; +} |