llvm-project/clang/test/CodeGen/Inputs
Rong Xu 60d3947922 [remark][diagnostics] Using clang diagnostic handler for IR input files
For IR input files, we currently use LLVM diagnostic handler even the
compilation is from clang. As a result, we are not able to use -Rpass
to get the transformation reports. Some warnings are not handled
properly either: We found many mysterious warnings in our ThinLTO backend
compilations in SamplePGO and CSPGO. An example of the warning:
"warning: net/proto2/public/metadata_lite.h:51:21: 0.02% (1 / 4999)"

This turns out to be a warning by Wmisexpect, which is supposed to be
filtered out by default. But since the filter is in clang's
diagnostic hander, we emit these incomplete warnings from LLVM's
diagnostic handler.

This patch uses clang diagnostic handler for IR input files. We create
a fake backendconsumer just to install the diagnostic handler.

With this change, we will have proper handling of all the warnings and we can
use -Rpass* options in IR input files compilation.
Also note that with is patch, LLVM's diagnostic options, like
"-mllvm -pass-remarks=*", are no longer be able to get optimization remarks.

Differential Revision: https://reviews.llvm.org/D72523
2020-01-14 15:44:57 -08:00
..
code-coverage-filter1.h [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659) 2018-11-17 19:41:39 +00:00
code-coverage-filter2.h [Clang] Add options -fprofile-filter-files and -fprofile-exclude-files to filter the files to instrument with gcov (after revert https://reviews.llvm.org/rL346659) 2018-11-17 19:41:39 +00:00
debug-info-embed-source.c
debug-info-file-checksum-line.cpp [DebugInfo] Don't emit checksums when compiling a preprocessed CPP 2019-05-21 19:40:28 +00:00
debug-info-file-checksum-pre.cpp [DebugInfo] Don't emit checksums when compiling a preprocessed CPP 2019-05-21 19:40:28 +00:00
debug-info-file-checksum.c
debug-info-macro.h
opt-record.proftext
pgo-sample-thinlto-summary.prof
pgo-sample.prof
pgotestclang.profraw
pgotestir.profraw
pgotestir.proftext [PGO] Re-submit: Clang part of change for context-sensitive PGO (part2) 2019-03-06 23:00:38 +00:00
pgotestir_cs.proftext [PGO] Re-submit: Clang part of change for context-sensitive PGO (part2) 2019-03-06 23:00:38 +00:00
sanitizer-blacklist-vfsoverlay.yaml [clang] Add VFS support for sanitizers' blacklists 2019-11-08 10:58:50 -08:00
sanitizer-special-case-list.sanitized.txt
sanitizer-special-case-list.unsanitized1.txt
sanitizer-special-case-list.unsanitized2.txt
sanitizer-special-case-list.unsanitized3.txt
sanitizer-special-case-list.unsanitized4.txt
stdio.h
thinlto-distributed-backend-skip.bc
thinlto-multi-module.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
thinlto_backend.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
thinlto_backend_local_name_conflict1.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
thinlto_backend_local_name_conflict2.ll Reland "Change the X86 datalayout to add three address spaces 2019-09-10 23:15:38 +00:00
thinlto_expect1.proftext [remark][diagnostics] Using clang diagnostic handler for IR input files 2020-01-14 15:44:57 -08:00
thinlto_expect2.proftext [remark][diagnostics] Using clang diagnostic handler for IR input files 2020-01-14 15:44:57 -08:00