diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-14 00:30:41 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-14 00:30:41 +0000 |
commit | 0668dc7955644dcf5003b5356dabf9edb847932f (patch) | |
tree | d811fff5b9ee63f26e8656d407667a831fbce56d /include | |
parent | 1135a232eb99c033d820d2b278e6f1d19a45cd29 (diff) | |
download | external_llvm-0668dc7955644dcf5003b5356dabf9edb847932f.zip external_llvm-0668dc7955644dcf5003b5356dabf9edb847932f.tar.gz external_llvm-0668dc7955644dcf5003b5356dabf9edb847932f.tar.bz2 |
Add helpers for fetching basic types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/IRBuilder.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h index e216d4c..549b89e 100644 --- a/include/llvm/Support/IRBuilder.h +++ b/include/llvm/Support/IRBuilder.h @@ -124,6 +124,42 @@ public: } //===--------------------------------------------------------------------===// + // Type creation methods + //===--------------------------------------------------------------------===// + + const Type *getInt1Ty() { + return Type::getInt1Ty(Context); + } + + const Type *getInt8Ty() { + return Type::getInt8Ty(Context); + } + + const Type *getInt16Ty() { + return Type::getInt16Ty(Context); + } + + const Type *getInt32Ty() { + return Type::getInt32Ty(Context); + } + + const Type *getInt64Ty() { + return Type::getInt64Ty(Context); + } + + const Type *getFloatTy() { + return Type::getFloatTy(Context); + } + + const Type *getDoubleTy() { + return Type::getDoubleTy(Context); + } + + const Type *getVoidTy() { + return Type::getVoidTy(Context); + } + + //===--------------------------------------------------------------------===// // Instruction creation methods: Terminators //===--------------------------------------------------------------------===// |