[PATCH] D53167: [interception] Switch to _type suffix instead of _f, NFC.
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 11 13:45:02 PDT 2018
kubamracek created this revision.
kubamracek added reviewers: kcc, dvyukov, george.karpenkov, delcypher, eugenis.
kubamracek added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
Some Darwin functions have pairs like `dispatch_apply` and `dispatch_apply_f` so the added `_f` to interceptor types causes a clash. Let's add `_type` suffix instead.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D53167
Files:
lib/interception/interception.h
lib/interception/interception_linux.h
Index: lib/interception/interception_linux.h
===================================================================
--- lib/interception/interception_linux.h
+++ lib/interception/interception_linux.h
@@ -38,7 +38,7 @@
// Android, Solaris and OpenBSD do not have dlvsym
#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
#define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
- (::__interception::real_##func = (func##_f)( \
+ (::__interception::real_##func = (func##_type)( \
unsigned long)::__interception::GetFuncAddrVer(#func, symver))
#else
#define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
Index: lib/interception/interception.h
===================================================================
--- lib/interception/interception.h
+++ lib/interception/interception.h
@@ -170,7 +170,7 @@
#elif !SANITIZER_MAC
# define PTR_TO_REAL(x) real_##x
# define REAL(x) __interception::PTR_TO_REAL(x)
-# define FUNC_TYPE(x) x##_f
+# define FUNC_TYPE(x) x##_type
# define DECLARE_REAL(ret_type, func, ...) \
typedef ret_type (*FUNC_TYPE(func))(__VA_ARGS__); \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53167.169296.patch
Type: text/x-patch
Size: 1147 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181011/18b9fc88/attachment.bin>
More information about the llvm-commits
mailing list