[llvm] r323012 - [WebAssembly] Fix MSVC build
Derek Schuff via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 16:01:19 PST 2018
Author: dschuff
Date: Fri Jan 19 16:01:18 2018
New Revision: 323012
URL: http://llvm.org/viewvc/llvm-project?rev=323012&view=rev
Log:
[WebAssembly] Fix MSVC build
nullptr_t can't be used left of boolean &&
Modified:
llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp?rev=323012&r1=323011&r2=323012&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp Fri Jan 19 16:01:18 2018
@@ -465,11 +465,12 @@ ManagedStatic<RuntimeLibcallSignatureTab
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
More information about the llvm-commits
mailing list