Keeping msan a function pass requires replacing the module level initialization:
That means, don't define a ctor function which calls __msan_init, instead just
declare the init function at the first access, and add that to the global ctors
list.
Changes:
- Pull sanitizer and wrapper pass apart
- Add a newpm msan
- Update tests
Caveats:
- There is one test that I dropped, because it specifically tested the definition of the ctor.
This sentence would be easier for me to read as: "Note that the optional arguments are not considered for matching the global and only have effect when this function needs to add a declaration."