[llvm-commits] [llvm] r78969 - /llvm/trunk/include/llvm/Support/IRBuilder.h

Owen Anderson resistor at mac.com
Thu Aug 13 17:30:41 PDT 2009


Author: resistor
Date: Thu Aug 13 19:30:41 2009
New Revision: 78969

URL: http://llvm.org/viewvc/llvm-project?rev=78969&view=rev
Log:
Add helpers for fetching basic types.

Modified:
    llvm/trunk/include/llvm/Support/IRBuilder.h

Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=78969&r1=78968&r2=78969&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Thu Aug 13 19:30:41 2009
@@ -124,6 +124,42 @@
   }
 
   //===--------------------------------------------------------------------===//
+  // 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
   //===--------------------------------------------------------------------===//
 





More information about the llvm-commits mailing list