[WebAssembly] Fix MSVC build

nullptr_t can't be used left of boolean &&

llvm-svn: 323012
This commit is contained in:
Derek Schuff 2018-01-20 00:01:18 +00:00
parent 587deb4557
commit a83a665cd4
1 changed files with 6 additions and 5 deletions

View File

@ -465,11 +465,12 @@ ManagedStatic<RuntimeLibcallSignatureTable> RuntimeLibcallSignatures;
struct StaticLibcallNameMap {
StringMap<RTLIB::Libcall> Map;
StaticLibcallNameMap() {
#define HANDLE_LIBCALL(code, name) \
if (name && RuntimeLibcallSignatures->Table[RTLIB::code] != unsupported) { \
assert(Map.find(StringRef::withNullAsEmpty(name)) == Map.end() && \
"duplicate libcall names in name map"); \
Map[StringRef::withNullAsEmpty(name)] = RTLIB::code; \
#define HANDLE_LIBCALL(code, name) \
if ((const char *)name && \
RuntimeLibcallSignatures->Table[RTLIB::code] != unsupported) { \
assert(Map.find(StringRef::withNullAsEmpty(name)) == Map.end() && \
"duplicate libcall names in name map"); \
Map[StringRef::withNullAsEmpty(name)] = RTLIB::code; \
}
#include "llvm/CodeGen/RuntimeLibcalls.def"
#undef HANDLE_LIBCALL