[PATCH] D20647: Add flag to add InlineHint attribute on implicitly inline functions
Rudy Pons via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 16:28:19 PDT 2016
Ilod added a comment.
I don't think weak linkage defines this.
For example, in:
struct A {
inline int foo() { return 0; }
int bar() { return 1; }
int baz();
};
int A::baz() { return 2; }
With /Ob1, we should inline foo and bar, but never baz. But baz doesn't have weak linkage, does it?
But indeed, if in CodeGenFunctions.cpp, instead of adding InlineHint attribute when we have isInlined(), I add noinline attribute if we don't have it (with /Ob1 or equivalent clang flag), I could avoid the work I started to inline only hinted functions at http://reviews.llvm.org/D20603
http://reviews.llvm.org/D20647
More information about the cfe-commits
mailing list