diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-10 14:42:15 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-09-10 14:42:15 +0000 |
commit | 9213e07a7f95b3e634b97a7bba70849badcf2c8a (patch) | |
tree | 6d3ba8aa2e8cddcf8237c0590562f2cbc423d148 /lib/interception | |
parent | 7847d77b246635211c3bf465421d49d7af5226c1 (diff) | |
download | compiler-rt-9213e07a7f95b3e634b97a7bba70849badcf2c8a.tar.gz |
[ASan] Remove the explicit function prototypes for intercepted functions on Windows
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190411 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception')
-rw-r--r-- | lib/interception/interception.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/interception/interception.h b/lib/interception/interception.h index d50af3541..cc8d7b0d2 100644 --- a/lib/interception/interception.h +++ b/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__) |