HomePhabricator

Reland the "[NewPM] Port Sancov" patch from rL365838. No functional changes…

Authored by leonardchan on Jul 25 2019, 1:53 PM.

Description

Reland the "[NewPM] Port Sancov" patch from rL365838. No functional changes were made to the patch since then.


[NewPM] Port Sancov

This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty.

Changes:

  • Split SanitizerCoverageModule into 2 SanitizerCoverage for passing over functions and ModuleSanitizerCoverage for passing over modules.
  • ModuleSanitizerCoverage exists for adding 2 module level calls to initialization functions but only if there's a function that was instrumented by sancov.
  • Added legacy and new PM wrapper classes that own instances of the 2 new classes.
  • Update llvm tests and add clang tests.

llvm-svn: 367053

Details

Committed
leonardchanJul 25 2019, 1:53 PM
Parents
rG9294c87282c6: [LLDB] Find debugserver in Command Line Tools as well
Branches
Unknown
Tags
Unknown

Event Timeline

/home/xbolva00/LLVM/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1028:13: warning: ‘std::__cxx11::string {anonymous}::SanitizerCoverage::getSectionEnd(const string&) const’ defined but not used [-Wunused-function]
std::string SanitizerCoverage::getSectionEnd(const std::string &Section) const {

^~~~~~~~~~~~~~~~~

/home/xbolva00/LLVM/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1024:1: warning: ‘std::__cxx11::string {anonymous}::SanitizerCoverage::getSectionStart(const string&) const’ defined but not used [-Wunused-function]
SanitizerCoverage::getSectionStart(const std::string &Section) const {

GCC 7 Linux release build.