In this diff I propose to add a new auxiliary file to each sanitizer: sanitizer_interface.inc, listing all the functions exported, with the macros: INTERFACE_FUNCTION() and INTERFACE_WEAK_FUNCTION().
So, when we need to define/do something for each function in the sanitizer's interface, we can define the macros and include that header, like:
#define INTERFACE_FUNCTION(Name) //Do something with Name. #define INTERFACE_WEAK_FUNCTION(Name) //Do something with Name, maybe different because Name is a weak function. #include "sanitizer_interface.inc"
In particular, I need these files for Windows, in the nexts diffs.
Also, this files could replace the existing files: weak_symbols.txt for Apple. Instead of reading weak_symbols.txt to get the list of weak symbols, we can read the file sanitizer_interface.inc and consider all the symbols included with the macro INTERFACE_WEAK_FUNCTION(Name).
In this diff, I only include these files to the sanitizers that work on Windows. We could do the same for the rest of the sanitizers and remove the weak_symbols.txt files.