[PATCH] D35592: [WebAssembly] Remove duplicated RTLIB names

Heejin Ahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 18:28:25 PDT 2017


aheejin added inline comments.


================
Comment at: lib/Target/WebAssembly/WebAssemblyRuntimeLibcallSignatures.cpp:883
 
+static StringRef StringRefOrEmpty(const char* arg) {
+  if (arg) return StringRef(arg);
----------------
dschuff wrote:
> Can't construct a StringRef will nullptr, so we have this bit of ugliness.
I don't mind much, but if you care, can we do something like this?
```
enum Libcall {
#define HANDLE_LIBCALL(code, name) code,
#include "RuntimeLibcalls.def"
#undef HANDLE_LIBCALL
  UNKNOWN_LIBCALL  
}
```
and delete UNKNOWN_LIBCALL from RuntimeLibcalls.def.


https://reviews.llvm.org/D35592





More information about the llvm-commits mailing list