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 | 04f04da96cc25e4ad14747dcaaba72ca733d8e0e (patch) | |
tree | 2f8d4675860bdeb72d4c5b46d66bcc1b2eb91d3c /tools/llvm-stress | |
parent | c4d4524f232e0dc2dc81f7fc50ebdff3713b8b72 (diff) |
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
Diffstat (limited to 'tools/llvm-stress')
-rw-r--r-- | tools/llvm-stress/llvm-stress.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/llvm-stress/llvm-stress.cpp b/tools/llvm-stress/llvm-stress.cpp index 74b7735f8cd..f1cdc5fa105 100644 --- a/tools/llvm-stress/llvm-stress.cpp +++ b/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())); |