modimo added a comment.

In D152741#4438007 <https://reviews.llvm.org/D152741#4438007>, @tejohnson wrote:

> Ok what I missed is that you don't want to apply this to entire TUs, but 
> rather just some paths that are header files, which may be included in many 
> source files. So in your above example, you really only need to apply to the 
> path of third-party/include/boost.h - is that correct?

Yep!

> That would mark class A, and therefore anything derived from it won't get 
> devirtualized. I guess in your example above, you are trying to prevent the 
> devirtualization in a.cpp since there are hidden overrides (class C) in 
> boost.a native objects.

Exactly, we saw this scenario causing issues when enabling WPD.

> The example included with the patch applies the option to the source file of 
> the test case, and therefore its entire TU. It would be helpful to have a 
> test case structured like your example above, where the file path is just 
> that of the header.

Makes sense and yeah the test case is confusing. Changed it to apply to just 
the header file.

> Maybe a better option name is something like 
> -funknown-vtable-visibility-filepaths= ? It seems a bit more descriptive.

Sure, changed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152741/new/

https://reviews.llvm.org/D152741

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to