aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/InstrTypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/InstrTypes.h')
-rw-r--r--include/llvm/InstrTypes.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h
index faff798..560c32b 100644
--- a/include/llvm/InstrTypes.h
+++ b/include/llvm/InstrTypes.h
@@ -708,9 +708,10 @@ public:
/// @brief Create a result type for fcmp/icmp
static const Type* makeCmpResultType(const Type* opnd_type) {
if (const VectorType* vt = dyn_cast<const VectorType>(opnd_type)) {
- return VectorType::get(Type::Int1Ty, vt->getNumElements());
+ return VectorType::get(Type::getInt1Ty(opnd_type->getContext()),
+ vt->getNumElements());
}
- return Type::Int1Ty;
+ return Type::getInt1Ty(opnd_type->getContext());
}
};