diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-29 22:17:13 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-29 22:17:13 +0000 |
commit | debcb01b0f0a15f568ca69e8f288fade4bfc7297 (patch) | |
tree | 22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/VMCore/LLVMContext.cpp | |
parent | 37c4a2d6f15ff32c9ae91e333d655a349e195993 (diff) |
Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r-- | lib/VMCore/LLVMContext.cpp | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp index e38986eb3d..8bd45b2954 100644 --- a/lib/VMCore/LLVMContext.cpp +++ b/lib/VMCore/LLVMContext.cpp @@ -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); } |