Added llvm_unreachable to address warning: this statement may fall through. NFC.

llvm-svn: 305144
This commit is contained in:
Galina Kistanova 2017-06-10 08:04:51 +00:00
parent 038f9854ec
commit cc29dbfc62
1 changed files with 3 additions and 0 deletions

View File

@ -382,6 +382,7 @@ struct ConstModifier: public Modifier {
switch (Ran->Rand() % 2) {
case 0: if (Ty->getScalarType()->isIntegerTy())
return PT->push_back(ConstantVector::getAllOnesValue(Ty));
llvm_unreachable("Unexpected state");
case 1: if (Ty->getScalarType()->isIntegerTy())
return PT->push_back(ConstantVector::getNullValue(Ty));
}
@ -407,9 +408,11 @@ struct ConstModifier: public Modifier {
case 0: if (Ty->isIntegerTy())
return PT->push_back(ConstantInt::get(Ty,
APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
llvm_unreachable("Unexpected state");
case 1: if (Ty->isIntegerTy())
return PT->push_back(ConstantInt::get(Ty,
APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
llvm_unreachable("Unexpected state");
case 2: case 3: case 4: case 5:
case 6: if (Ty->isIntegerTy())
PT->push_back(ConstantInt::get(Ty, Ran->Rand()));