diff options
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r-- | lib/VMCore/LLVMContext.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/LLVMContext.cpp b/lib/VMCore/LLVMContext.cpp index 422798d220..4a9953a4f1 100644 --- a/lib/VMCore/LLVMContext.cpp +++ b/lib/VMCore/LLVMContext.cpp @@ -485,3 +485,10 @@ VectorType* LLVMContext::getVectorTypeExtendedElement(const VectorType* 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; +} |