IR printing for single function with the new pass manager.
authorHongtao Yu <hoy@devvm4643.prn2.facebook.com>
Sun, 23 Feb 2020 23:13:27 +0000 (15:13 -0800)
committerWenlei He <aktoon@gmail.com>
Sun, 23 Feb 2020 23:28:57 +0000 (15:28 -0800)
commitbae33a7c5a1f220671e6d99cda21749afe2501a6
tree426df6b39bad8b3f423d44daffc34ca326cb902c
parent384d5e33fe2ea0b40119b003b60cfa8b21e3fd15
IR printing for single function with the new pass manager.

Summary:
The IR printing always prints out all functions in a module with the new pass manager, even with -filter-print-funcs specified. This is being fixed in this change. However, there are two exceptions, i.e, with user-specified wildcast switch -filter-print-funcs=* or -print-module-scope, under which IR of all functions should be printed.

Test Plan:
make check-clang
make check-llvm

Reviewers: wenlei

Reviewed By: wenlei

Subscribers: wenlei, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D74814
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/module-pass-printer.ll