[NewPM] Port HWASan and Kernel HWASan

Authored by leonardchan on May 14 2019, 2:17 PM.


[NewPM] Port HWASan and Kernel HWASan

Port hardware assisted address sanitizer to new PM following the same guidelines as msan and tsan.


  • Separate HWAddressSanitizer into a pass class and a sanitizer class.
  • Create new PM wrapper pass for the sanitizer class.
  • Use the getOrINsert pattern for some module level initialization declarations.
  • Also enable kernel-kwasan in new PM
  • Update llvm tests and add clang test.

Differential Revision: https://reviews.llvm.org/D61709

llvm-svn: 360707