summaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContext.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-09 23:48:35 +0000
committerOwen Anderson <resistor@mac.com>2009-07-09 23:48:35 +0000
commit333c40096561218bc3597cf153c0a3895274414c (patch)
treebc6f5f739c43dec91104275aec30e16f30a7610e /lib/VMCore/LLVMContext.cpp
parent53674361efd42f9dd7c4d293132106839ab3b893 (diff)
downloadllvm-333c40096561218bc3597cf153c0a3895274414c.tar.gz
llvm-333c40096561218bc3597cf153c0a3895274414c.tar.bz2
llvm-333c40096561218bc3597cf153c0a3895274414c.tar.xz
This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContext.cpp')
-rw-r--r--lib/VMCore/LLVMContext.cpp7
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;
+}