summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/interception/interception.h
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2013-09-10 14:42:15 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2013-09-10 14:42:15 +0000
commit92702d8401806fde3405578130704c4477403816 (patch)
treedb79fbed46d5b6e8e08f38f8be4760f675ce94b9 /compiler-rt/lib/interception/interception.h
parent7a36e6126b6c029cd50234928617bd9e65db382e (diff)
downloadbcm5719-llvm-92702d8401806fde3405578130704c4477403816.tar.gz
bcm5719-llvm-92702d8401806fde3405578130704c4477403816.zip
[ASan] Remove the explicit function prototypes for intercepted functions on Windows
llvm-svn: 190411
Diffstat (limited to 'compiler-rt/lib/interception/interception.h')
-rw-r--r--compiler-rt/lib/interception/interception.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler-rt/lib/interception/interception.h b/compiler-rt/lib/interception/interception.h
index d50af35415d..cc8d7b0d249 100644
--- a/compiler-rt/lib/interception/interception.h
+++ b/compiler-rt/lib/interception/interception.h
@@ -130,7 +130,10 @@ const interpose_substitution substitution_##func_name[] \
# define WRAPPER_NAME(x) "wrap_"#x
# define INTERCEPTOR_ATTRIBUTE
# endif
-# define DECLARE_WRAPPER(ret_type, func, ...)
+# define DECLARE_WRAPPER(ret_type, func, ...) \
+ extern "C" ret_type func(__VA_ARGS__);
+# define DECLARE_WRAPPER_WINAPI(ret_type, func, ...) \
+ extern "C" __declspec(dllimport) ret_type __stdcall func(__VA_ARGS__);
#else
# define WRAP(x) __interceptor_ ## x
# define WRAPPER_NAME(x) "__interceptor_" #x
@@ -211,7 +214,7 @@ const interpose_substitution substitution_##func_name[] \
namespace __interception { \
FUNC_TYPE(func) PTR_TO_REAL(func); \
} \
- DECLARE_WRAPPER(ret_type, func, __VA_ARGS__) \
+ DECLARE_WRAPPER_WINAPI(ret_type, func, __VA_ARGS__) \
extern "C" \
INTERCEPTOR_ATTRIBUTE \
ret_type __stdcall WRAP(func)(__VA_ARGS__)
OpenPOWER on IntegriCloud