From 0fead05e69b6cc6a3e6394be571de47af8300d1f Mon Sep 17 00:00:00 2001 From: Evandro Menezes Date: Wed, 4 Sep 2019 18:15:58 +0000 Subject: [PATCH] [TargetLibraryInfo] Define enumerator for no library function (NFC) Add a null enumerator do designate no library function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370947 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/TargetLibraryInfo.h | 5 +++-- lib/Analysis/TargetLibraryInfo.cpp | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h index 829bd12c738..74185581ab5 100644 --- a/include/llvm/Analysis/TargetLibraryInfo.h +++ b/include/llvm/Analysis/TargetLibraryInfo.h @@ -30,11 +30,12 @@ struct VecDesc { unsigned VectorizationFactor; }; - enum LibFunc { + enum LibFunc : unsigned { #define TLI_DEFINE_ENUM #include "llvm/Analysis/TargetLibraryInfo.def" - NumLibFuncs + NumLibFuncs, + NotLibFunc }; /// Implementation of the target library information. diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp index bfa2873ddd9..32e866a5f7e 100644 --- a/lib/Analysis/TargetLibraryInfo.cpp +++ b/lib/Analysis/TargetLibraryInfo.cpp @@ -1478,6 +1478,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, return false; } case LibFunc::NumLibFuncs: + case LibFunc::NotLibFunc: break; } -- 2.40.0