[ThinLTO] Ensure sanitizer passes are run
authorTeresa Johnson <tejohnson@google.com>
Wed, 8 Nov 2017 19:45:52 +0000 (19:45 +0000)
committerTeresa Johnson <tejohnson@google.com>
Wed, 8 Nov 2017 19:45:52 +0000 (19:45 +0000)
commit07ec7d59c20461f2491f1f9e110ea43cd30e27a9
tree4fe600ec7ab42b138b6d9f82ae0ec1f34527a2d3
parente6094f9bd9d6e0c5fe4ee0ad02c4d7407e4388e7
[ThinLTO] Ensure sanitizer passes are run

Summary:
In ThinLTO compilation, we exit populateModulePassManager early and
were not adding PM extension passes meant to run at the end of the
pipeline. This includes sanitizer passes. Add these passes before
the early exit.

A test will be added to projects/compiler-rt.

Reviewers: pcc

Subscribers: mehdi_amini, inglorion, llvm-commits

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

llvm-svn: 317714
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp