diff options
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); } |