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

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 20:09:38 PDT 2021


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?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109252



More information about the llvm-commits mailing list