[PATCH] D28596: [compiler-rt] General definition for weak functions.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 15:47:38 PST 2017


rnk added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_win_defs.h:91
+  extern "C" __declspec(dllexport)                                             \
+  ReturnType WEAK_EXPORT_NAME(Name)(__VA_ARGS__)
+
----------------
Remind me why we need to declare the *__dll variants in headers? Can this be a .cc file implementation detail?

If we don't need to declare both foo and foo__dll, then we can get rid of WEAK_DECL and go back to something more like:
  extern "C" void SANITIZER_WEAK_DECL sancov_blah(int params);


https://reviews.llvm.org/D28596





More information about the llvm-commits mailing list