[PATCH] D109252: Add extra check for llvm::Any::TypeId visibility

Serge Guelton via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 02:03:02 PDT 2021


On Thu, Sep 16, 2021 at 03:09:38AM +0000, Serguei Katkov via Phabricator wrote:
> skatkov added inline comments.
> 
> 
> ================
> Comment at: llvm/test/tools/llvm-shlib/typeids.test:14
> +# CHECK-NOT: {{[^V]}} llvm::Any::TypeId
> +# SAFETY-CHECK: V llvm::Any::TypeId
> ----------------
> serge-sans-paille wrote:
> > skatkov wrote:
> > > ok, why do you expect only V here? As I understood the problem is that TypeId should not be local.
> > > 
> > > For example u is a unique global symbol and it should be accepted as well.
> > > 
> > > Do I miss anything? why u is worse than v?
> > > Such symbols are not weak linkage but they are not local to the library, so they do not break llvm::Any behavior.
> > > Test should be modified to check explicitly for all kinds of local linkage, instead of requiring one particular variance of global linkage.
> > My understanding is that templated symbol are granted weak linkage as a consequence of ODR. Reading the `nm` manpage, it indeed seems they could also be `u` or `v`. Do you see any other potential flag?
> I guess it is better to check local linkage but  do not see others flags so far.
> If you'd like to check globals as well u, v and V seems to be enough for now. We can extend this list later.
> 
> could you please fix this test?

Should be fixed by 85f2ae57f713cec55f26b40efb82c4ee8845c27a


More information about the llvm-commits mailing list