llvm.org GIT mirror llvm / 04f04da
Added llvm_unreachable to address warning: this statement may fall through. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305144 91177308-0d34-0410-b5e6-96231b3b80d8 Galina Kistanova 2 years ago
1 changed file(s) with 3 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
381381 switch (Ran->Rand() % 2) {
382382 case 0: if (Ty->getScalarType()->isIntegerTy())
383383 return PT->push_back(ConstantVector::getAllOnesValue(Ty));
384 llvm_unreachable("Unexpected state");
384385 case 1: if (Ty->getScalarType()->isIntegerTy())
385386 return PT->push_back(ConstantVector::getNullValue(Ty));
386387 }
406407 case 0: if (Ty->isIntegerTy())
407408 return PT->push_back(ConstantInt::get(Ty,
408409 APInt::getAllOnesValue(Ty->getPrimitiveSizeInBits())));
410 llvm_unreachable("Unexpected state");
409411 case 1: if (Ty->isIntegerTy())
410412 return PT->push_back(ConstantInt::get(Ty,
411413 APInt::getNullValue(Ty->getPrimitiveSizeInBits())));
414 llvm_unreachable("Unexpected state");
412415 case 2: case 3: case 4: case 5:
413416 case 6: if (Ty->isIntegerTy())
414417 PT->push_back(ConstantInt::get(Ty, Ran->Rand()));