This check should ensure we don't reproduce the problem fixed by
02df443d2801601a4e42e360e436d97314e9da30
More accurately, it checks every llvm::Any::TypeId symbol in libLLVM-x.so and
make sure they have weak linkage and are not local to the library, which would
lead to duplicate definition if another weak version of the symbol is defined in
another linked library.
It's a follow-up to https://reviews.llvm.org/D108943
This should use llvm-nm.
Also, can you make it into a lit test like this one:
https://github.com/llvm/llvm-project/tree/main/clang/test/LibClang