diff options
author | Galina Kistanova <gkistanova@gmail.com> | 2017-06-10 08:04:51 +0000 |
---|---|---|
committer | Galina Kistanova <gkistanova@gmail.com> | 2017-06-10 08:04:51 +0000 |
commit | cc29dbfc62d6373e5bf44078af233d2625c7fd03 (patch) | |
tree | ba92b6f0e7df144003a46c2cf5e271fffb0c1e40 /llvm/tools | |
parent | 038f9854ec9df348c16496004fcee9e4769ebe1e (diff) | |
download | bcm5719-llvm-cc29dbfc62d6373e5bf44078af233d2625c7fd03.tar.gz bcm5719-llvm-cc29dbfc62d6373e5bf44078af233d2625c7fd03.zip |
Added llvm_unreachable to address warning: this statement may fall through. NFC.
llvm-svn: 305144
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-stress/llvm-stress.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-stress/llvm-stress.cpp b/llvm/tools/llvm-stress/llvm-stress.cpp index 74b7735f8cd..f1cdc5fa105 100644 --- a/llvm/tools/llvm-stress/llvm-stress.cpp +++ b/llvm/tools/llvm-stress/llvm-stress.cpp @@ -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())); |