Move types back to the 2.5 API.
[oota-llvm.git] / lib / VMCore / LLVMContext.cpp
index e38986eb3df9b2f55eb8f46ebab4b82b0196e1c2..8bd45b2954d27a445a29fb731708e359dcf56c83 100644 (file)
@@ -113,89 +113,6 @@ MDString* LLVMContext::getMDString(const StringRef &Str) {
   return pImpl->getMDString(Str.data(), Str.size());
 }
 
-// FunctionType accessors
-FunctionType* LLVMContext::getFunctionType(const Type* Result, bool isVarArg) {
-  return FunctionType::get(Result, isVarArg);
-}
-
-FunctionType* LLVMContext::getFunctionType(const Type* Result,
-                                         const std::vector<const Type*>& Params,
-                                         bool isVarArg) {
-  return FunctionType::get(Result, Params, isVarArg);
-}
-                                
-// IntegerType accessors
-const IntegerType* LLVMContext::getIntegerType(unsigned NumBits) {
-  return IntegerType::get(NumBits);
-}
-  
-// OpaqueType accessors
-OpaqueType* LLVMContext::getOpaqueType() {
-  return OpaqueType::get();
-}
-
-// StructType accessors
-StructType* LLVMContext::getStructType(bool isPacked) {
-  return StructType::get(isPacked);
-}
-
-StructType* LLVMContext::getStructType(const std::vector<const Type*>& Params,
-                                       bool isPacked) {
-  return StructType::get(Params, isPacked);
-}
-
-StructType *LLVMContext::getStructType(const Type *type, ...) {
-  va_list ap;
-  std::vector<const llvm::Type*> StructFields;
-  va_start(ap, type);
-  while (type) {
-    StructFields.push_back(type);
-    type = va_arg(ap, llvm::Type*);
-  }
-  return StructType::get(StructFields);
-}
-
-// ArrayType accessors
-ArrayType* LLVMContext::getArrayType(const Type* ElementType,
-                                     uint64_t NumElements) {
-  return ArrayType::get(ElementType, NumElements);
-}
-  
-// PointerType accessors
-PointerType* LLVMContext::getPointerType(const Type* ElementType,
-                                         unsigned AddressSpace) {
-  return PointerType::get(ElementType, AddressSpace);
-}
-
-PointerType* LLVMContext::getPointerTypeUnqual(const Type* ElementType) {
-  return PointerType::getUnqual(ElementType);
-}
-  
-// VectorType accessors
-VectorType* LLVMContext::getVectorType(const Type* ElementType,
-                                       unsigned NumElements) {
-  return VectorType::get(ElementType, NumElements);
-}
-
-VectorType* LLVMContext::getVectorTypeInteger(const VectorType* VTy) {
-  return VectorType::getInteger(VTy);  
-}
-
-VectorType* LLVMContext::getVectorTypeExtendedElement(const VectorType* VTy) {
-  return VectorType::getExtendedElementVectorType(VTy);
-}
-
-VectorType* LLVMContext::getVectorTypeTruncatedElement(const VectorType* VTy) {
-  return VectorType::getTruncatedElementVectorType(VTy);
-}
-
-const Type* LLVMContext::makeCmpResultType(const Type* opnd_type) {
-  if (const VectorType* vt = dyn_cast<const VectorType>(opnd_type)) {
-    return getVectorType(Type::Int1Ty, vt->getNumElements());
-  }
-  return Type::Int1Ty;
-}
-
 void LLVMContext::erase(MDString *M) {
   pImpl->erase(M);
 }