diff options
author | Derek Schuff <dschuff@google.com> | 2018-01-20 00:01:18 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2018-01-20 00:01:18 +0000 |
commit | a83a665cd42240f59b0861ae1854e0764bee11cd (patch) | |
tree | 07f748be868f08548419cce753a5df62232d2dae /llvm/lib | |
parent | 587deb45577750344251d2595300c2b68a431b5b (diff) | |
download | bcm5719-llvm-a83a665cd42240f59b0861ae1854e0764bee11cd.tar.gz bcm5719-llvm-a83a665cd42240f59b0861ae1854e0764bee11cd.zip |
[WebAssembly] Fix MSVC build
nullptr_t can't be used left of boolean &&
llvm-svn: 323012
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp index 580daba70c8..d4d41520666 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp @@ -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 |