There are a number of test cases that fail when clang is built to use NPM by default. This is due to a number of issues. One of those issues is that when we construct the memory sanitizer instrumentation pass with the NPM, we do not pass in the pertinent flags. This patch focuses on that issue.
For testing, this patch simply duplicates the tests that fail due to this issue and adds -fexperimental-new-pass-manager to the compile step. Once the NPM is the default, we can presumably remove those test cases.
this patch changes behavior of clang CodeGen, so it should have tests there.
probably in a test similar to clang/test/CodeGen/asan-new-pm.ll