This patch changes AddressSanitizer from a FunctionPass to a ModulePass. The purpose of this is to make it simpler to eventually port this pass to the new pass manager. The class depends on the module for some initialization, but does this through doInitialization, but the new PM infra does not seem to have an equivalent overridable method for new PM passes. Making the sanitizer run on modules allows for performing this initialization at the start of every module run while still performing per-function instrumentation. This change is made so that the logic behind AddressSanitizer can be abstracted out and be used between separate module passes for the legacy and new PM.
This is part of the second attempt of porting ASan to the new PM after D52739.
- Remove the unused DominatorTree dependency