diff options
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 |