[PATCH] D46712: Port msan_test.cc to NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 17 14:35:33 PDT 2018


krytarowski added inline comments.


================
Comment at: lib/msan/tests/msan_test.cc:3081
+#if defined(__FreeBSD__) || defined(__NetBSD__)
 static void GetProgramPath(char *buf, size_t sz) {
+#if defined(__FreeBSD__)
----------------
vitalybuka wrote:
> Could please make it:
> 
> ```
> #if defined(__FreeBSD__) 
> // entire function
> #elif defined(__NetBSD__)
> // entire function
> #elif defined(__GLIBC__)
> // entire function
> #else
> # error "TODO: port this"
> #endif
> ```
There is an informal tradition to reuse the same code in FreeBSD and NetBSD, ifdefing only the MIB part.


Repository:
  rL LLVM

https://reviews.llvm.org/D46712





More information about the llvm-commits mailing list