From 0668dc7955644dcf5003b5356dabf9edb847932f Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Fri, 14 Aug 2009 00:30:41 +0000 Subject: Add helpers for fetching basic types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78969 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/IRBuilder.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'include') 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 //===--------------------------------------------------------------------===// -- cgit v1.1