CMake: removed lib/VMCore/DebugInfoBuilder.cpp.
[oota-llvm.git] / lib / VMCore / Constants.cpp
index 5fc08dc900ecf826dad33b651a43992435f0f089..4e3b840c913154b16c203de00250954551a69d26 100644 (file)
@@ -2111,9 +2111,7 @@ Constant *ConstantExpr::getCompare(unsigned short pred,
 
 Constant *ConstantExpr::getSelectTy(const Type *ReqTy, Constant *C,
                                     Constant *V1, Constant *V2) {
-  assert(C->getType() == Type::Int1Ty && "Select condition must be i1!");
-  assert(V1->getType() == V2->getType() && "Select value types must match!");
-  assert(V1->getType()->isFirstClassType() && "Cannot select aggregate type!");
+  assert(!SelectInst::areInvalidOperands(C, V1, V2)&&"Invalid select operands");
 
   if (ReqTy == V1->getType())
     if (Constant *SC = ConstantFoldSelectInstruction(C, V1, V2))