[PATCH] Interception macros for sanitizers on FreeBSD
Kostya Serebryany
kcc at google.com
Thu Feb 20 05:15:01 PST 2014
================
Comment at: lib/interception/interception_freebsd.h:25
@@ +24,3 @@
+namespace __interception {
+namespace freebsd {
+
----------------
Why namespace freebsd?
Only one version of GetRealFunctionAddress should exist, which is enforced by #ifdef __FreeBSD__, etc.
If this enforcement breaks, we'll get GetRealFunctionAddress and freebsd::GetRealFunctionAddress, which is a mess.
I'd prefer to not introduce "namespace freebsd" or at least add a comment why you need one here.
================
Comment at: lib/interception/interception.h:145
@@ +144,3 @@
+ extern "C" ret_type func(__VA_ARGS__) \
+ __attribute__((alias("__interceptor_" #func), visibility("default")));
+# else
----------------
doesn't "weak" work on FeeBSD? (just curious)
http://llvm-reviews.chandlerc.com/D2828
More information about the llvm-commits
mailing list