OSDN Git Service

[WebAssembly] Relax constexpr for old standard libraries.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 26 Feb 2018 11:07:25 +0000 (11:07 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 26 Feb 2018 11:07:25 +0000 (11:07 +0000)
This will still be constexpr when the standard library supports it, but
doesn't force constexpr. Old libraries will get a global constructor,
which is not too bad.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@326080 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp

index e2b5181..97d33c4 100644 (file)
@@ -465,7 +465,7 @@ ManagedStatic<RuntimeLibcallSignatureTable> RuntimeLibcallSignatures;
 struct StaticLibcallNameMap {
   StringMap<RTLIB::Libcall> Map;
   StaticLibcallNameMap() {
-    static constexpr std::pair<const char *, RTLIB::Libcall> NameLibcalls[] = {
+    static const std::pair<const char *, RTLIB::Libcall> NameLibcalls[] = {
 #define HANDLE_LIBCALL(code, name) {(const char *)name, RTLIB::code},
 #include "llvm/CodeGen/RuntimeLibcalls.def"
 #undef HANDLE_LIBCALL