summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2017-06-23 02:38:45 +0000
committerBrian Gesiak <modocache@gmail.com>2017-06-23 02:38:45 +0000
commit0ea58886c4d1417a9545e4206ae62d17f852129d (patch)
tree012339ae1770785b0ed92652fd4b9c8578c9960c /clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
parent34e94a87830910fc35ffcc3eba50636b6256059c (diff)
downloadbcm5719-llvm-0ea58886c4d1417a9545e4206ae62d17f852129d.tar.gz
bcm5719-llvm-0ea58886c4d1417a9545e4206ae62d17f852129d.zip
[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
Diffstat (limited to 'clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext')
-rw-r--r--clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext b/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
new file mode 100644
index 00000000000..aeea583de4d
--- /dev/null
+++ b/clang/test/Frontend/Inputs/optimization-remark-with-hotness-sample.proftext
@@ -0,0 +1,7 @@
+foo:0:0
+ 0: 0
+bar:29:29
+ 6: foo:0
+main:0:0
+ 0: 0 bar:0
+
OpenPOWER on IntegriCloud