Skip to content
Commit 0ea58886 authored by Brian Gesiak's avatar Brian Gesiak
Browse files

[Frontend] 'Show hotness' can be used with a sampling profile

Summary:
Prior to this change, using `-fdiagnostics-show-hotness` with a sampling
profile specified via `-fprofile-sample-use=` would result in the Clang
frontend emitting a warning: "argument '-fdiagnostics-show-hotness' requires
profile-guided optimization information". Of course, a sampling profile
*is* profile-guided optimization information, so the warning is misleading.
Furthermore, despite the warning, hotness was displayed based on the data in
the sampling profile.

Prevent the warning from being emitted when a sampling profile is used, and
add a test that verifies this.

Reviewers: anemet, davidxl

Reviewed By: davidxl

Subscribers: danielcdh, cfe-commits

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

llvm-svn: 306079
parent 34e94a87
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment