[compiler-rt] r352395 - [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h

Jonathan Metzman via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 28 09:51:14 PST 2019


Author: metzman
Date: Mon Jan 28 09:51:13 2019
New Revision: 352395

URL: http://llvm.org/viewvc/llvm-project?rev=352395&view=rev
Log:
[libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h

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

Modified:
    compiler-rt/trunk/lib/fuzzer/FuzzerInterface.h

Modified: compiler-rt/trunk/lib/fuzzer/FuzzerInterface.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/FuzzerInterface.h?rev=352395&r1=352394&r2=352395&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/FuzzerInterface.h (original)
+++ compiler-rt/trunk/lib/fuzzer/FuzzerInterface.h Mon Jan 28 09:51:13 2019
@@ -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")))




More information about the llvm-commits mailing list