diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-11-11 02:29:29 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-11-11 02:29:29 +0000 |
commit | 55e874299f2ad827646a4ca9ea38c402aaeb38c9 (patch) | |
tree | d9cb06d4f8c89486868bb6ac941c120e86f99917 /lib/CodeGen/CodeGenFunction.h | |
parent | d2f016f8f27db0820c46fbfbf2bcc0825f3a4284 (diff) |
Centralize basic block creation in CodeGenFunction::createBasicBlock.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59017 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index e6636ba27b..c9dcaa7d55 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -212,12 +212,18 @@ public: /// hasAggregateLLVMType - Return true if the specified AST type will map into /// an aggregate LLVM type or is void. static bool hasAggregateLLVMType(QualType T); - + + /// createBasicBlock - Create an LLVM basic block. + llvm::BasicBlock *createBasicBlock(const char *Name="", + llvm::Function *Parent=0, + llvm::BasicBlock *InsertBefore=0) { + return llvm::BasicBlock::Create(Name, Parent, InsertBefore); + } + /// getBasicBlockForLabel - Return the LLVM basicblock that the specified /// label maps to. llvm::BasicBlock *getBasicBlockForLabel(const LabelStmt *S); - void EmitBlock(llvm::BasicBlock *BB); /// ErrorUnsupported - Print out an error that codegen doesn't support the |