This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer][MSVC] Make attribute-use compatible with MSVC
ClosedPublic

Authored by metzman on Jan 9 2019, 1:24 PM.

Event Timeline

metzman created this revision.Jan 9 2019, 1:24 PM
metzman retitled this revision from [libFuzzer][MSVC] Make attributes-use compatible with MSVC to [libFuzzer][MSVC] Make attribute-use compatible with MSVC.Jan 14 2019, 6:11 PM
metzman updated this revision to Diff 181699.Jan 14 2019, 7:01 PM

fix newlines

Please take a look Vitaly

vitalybuka added inline comments.Jan 16 2019, 1:53 PM
compiler-rt/lib/fuzzer/FuzzerDefs.h
133

what happend with __declspec(dllexport)

compiler-rt/lib/fuzzer/FuzzerInterface.h
32

why we don't use ATTRIBUTE_INTERFACE

metzman updated this revision to Diff 182198.Jan 16 2019, 5:31 PM
metzman marked 3 inline comments as done.
  • add dllexport back
metzman updated this revision to Diff 182199.Jan 16 2019, 5:32 PM
  • fix comment
Harbormaster completed remote builds in B26955: Diff 182199.
metzman updated this revision to Diff 182200.Jan 16 2019, 5:35 PM
  • remove extra space
metzman added inline comments.Jan 16 2019, 5:35 PM
compiler-rt/lib/fuzzer/FuzzerDefs.h
133

Thanks for noticing this. I shouldn't have removed it and I added it back.

compiler-rt/lib/fuzzer/FuzzerInterface.h
32

Do you mean rename this ATTRIBUTE_INTERFACE? Or do you mean include FuzzerDefs.h and use that definition?
First seems 100% OK to do.
The second one I didn't do because this header is included by somethings that aren't part of libFuzzer and I didn't want to leak everything from FuzzerDefs.h to anything including FuzzerInterface.h.

I can do whichever you prefer.

41

I initially didn't set FUZZER_INTERFACE_VISIBILITY to dllexport on Windows since I felt weird about making these functions dllexport when they aren't even defined by libFuzzer.

There may be something I am missing here, but what do you think about removing FUZZER_INTERFACE_VISIBILITY from LLVMFuzzerInitialize, LLVMFuzzerCustomCrossOver, LLVMFuzzerCustomMutator?
What do they do here?

This revision is now accepted and ready to land.Jan 16 2019, 6:50 PM
This revision was automatically updated to reflect the committed changes.