diff options
| author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-01-17 19:54:18 +0000 |
|---|---|---|
| committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-01-17 19:54:18 +0000 |
| commit | 86b680a372e38161c4e33b0bf82f129820d9fbb7 (patch) | |
| tree | 00e6038531b585e793ba5d9092bac912a4cb37eb /llvm/lib/Analysis | |
| parent | 8eccb9bbb1e49823d59d2e85e40c6c793c2bb588 (diff) | |
| download | bcm5719-llvm-86b680a372e38161c4e33b0bf82f129820d9fbb7.tar.gz bcm5719-llvm-86b680a372e38161c4e33b0bf82f129820d9fbb7.zip | |
[TLI] Appease spurious MSVC warning using llvm_unreachable. NFC.
r292188 confused MSVC because of the combined lack of a default
case and return statement.
Move the unreachable outside of the NumLibFuncs case, to make it
obvious that all cases should be handled.
llvm_unreachable is __declspec(noreturn), so I'm assuming this
does appease MSVC.
llvm-svn: 292246
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/TargetLibraryInfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index 27e98035991..aea29e6359d 100644 --- a/llvm/lib/Analysis/TargetLibraryInfo.cpp +++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp @@ -1177,9 +1177,10 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, FTy.getParamType(1) == SizeTTy && FTy.getParamType(2) == SizeTTy); case LibFunc::NumLibFuncs: - llvm_unreachable("Invalid sentinel libfunc value"); + break; } + llvm_unreachable("Invalid libfunc"); } bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, |

