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

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 11:29:26 PDT 2021


serge-sans-paille 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
----------------
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?


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