[libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h
authorJonathan Metzman <metzman@chromium.org>
Mon, 28 Jan 2019 17:51:13 +0000 (17:51 +0000)
committerJonathan Metzman <metzman@chromium.org>
Mon, 28 Jan 2019 17:51:13 +0000 (17:51 +0000)
Summary:
Use dllexport for all declarations in FuzzerInterface.h Use it for clang
even though clang supports default visibility attribute to prevent a
warning from being thrown when LLVMFuzzerMutate is defined with dllexport.
This makes `FUZZER_INTERFACE_VISIBILITY` (FuzzerInterface.h) consistent with
`ATTRIBUTE_INTERFACE` (FuzzerDefs.h) when using clang on Windows.

Reviewers: vitalybuka, morehouse

Reviewed By: morehouse

Differential Revision: https://reviews.llvm.org/D57305

llvm-svn: 352395

compiler-rt/lib/fuzzer/FuzzerInterface.h

index 415b888..4f62822 100644 (file)
@@ -27,7 +27,7 @@ extern "C" {
 
 // Define FUZZER_INTERFACE_VISIBILITY to set default visibility in a way that
 // doesn't break MSVC.
-#if defined(_MSC_VER) && !defined(__clang__)
+#if defined(_WIN32)
 #define FUZZER_INTERFACE_VISIBILITY __declspec(dllexport)
 #else
 #define FUZZER_INTERFACE_VISIBILITY __attribute__((visibility("default")))