summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/TargetLibraryInfo.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2017-01-17 19:54:18 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2017-01-17 19:54:18 +0000
commit86b680a372e38161c4e33b0bf82f129820d9fbb7 (patch)
tree00e6038531b585e793ba5d9092bac912a4cb37eb /llvm/lib/Analysis/TargetLibraryInfo.cpp
parent8eccb9bbb1e49823d59d2e85e40c6c793c2bb588 (diff)
downloadbcm5719-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/TargetLibraryInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetLibraryInfo.cpp3
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,
OpenPOWER on IntegriCloud