From: Yevgeny Rouban Date: Fri, 1 Feb 2019 10:44:43 +0000 (+0000) Subject: Provide reason messages for unviable inlining X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07d269d2686e28ea49aaa43338db962b084adce3;p=clang Provide reason messages for unviable inlining InlineCost's isInlineViable() is changed to return InlineResult instead of bool. This provides messages for failure reasons and allows to get more specific messages for cases where callsites are not viable for inlining. Reviewed By: xbolva00, anemet Differential Revision: https://reviews.llvm.org/D57089 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352849 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Frontend/optimization-remark-with-hotness.c b/test/Frontend/optimization-remark-with-hotness.c index 150b7324da..5f4c83b46c 100644 --- a/test/Frontend/optimization-remark-with-hotness.c +++ b/test/Frontend/optimization-remark-with-hotness.c @@ -66,7 +66,7 @@ void bar(int x) { int main(int argc, const char *argv[]) { for (int i = 0; i < 30; i++) - // expected-remark@+1 {{bar not inlined into main because it should never be inlined (cost=never): always inliner (hotness:}} + // expected-remark@+1 {{bar not inlined into main because it should never be inlined (cost=never): no alwaysinline attribute (hotness:}} bar(argc); return sum; }