InlineCost's isInlineViable() is changed to return InlineResult instead of bool. This provides messages for failure reasons.
This allows to get more specific messages for cases where callsites are not viable for inlining.
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
Event Timeline
lib/Analysis/InlineCost.cpp | ||
---|---|---|
2028 ↗ | (On Diff #183045) | getNever should take a string |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
2028 ↗ | (On Diff #183045) | InlineResult is implicitly converted to char* Reason. |
lib/Analysis/InlineCost.cpp | ||
---|---|---|
2028 ↗ | (On Diff #183045) | Yes, readability would be better |
Comment Actions
This is great, please add some tests or check for remarks in existing tests (e.g. for the recursive case).
Comment Actions
Addressed comments:
- added a simple test
- changed implicit conversion to char* to explicit field access IsViable.message