xref: /llvm-project/llvm/test/tools/llvm-shlib/typeids.test (revision 85f2ae57f713cec55f26b40efb82c4ee8845c27a)
1# REQUIRES: x86_64-linux, llvm-dylib
2
3# Make sure there's no llvm::Any::TypeId symbol local to the shared library.  As
4# the adress of llvm::Any::TypeId::Id is used as a global unique identifier for
5# each type, having another visibility defeats the original purpose.
6#
7# This happens when llvm::Any::TypeId is parametrized by a type with hidden
8# visibility.
9
10# RUN: llvm-nm -C %llvmdylib | FileCheck %s
11# RUN: llvm-nm -C %llvmdylib | FileCheck %s --check-prefix=SAFETY-CHECK
12
13# CHECK-NOT: {{[^uvV]}} llvm::Any::TypeId
14# SAFETY-CHECK: {{[uvV]}} llvm::Any::TypeId
15