[all-commits] [llvm/llvm-project] 3d3abc: Force visibility of llvm::Any to external
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Thu May 20 01:06:28 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d3abc22b3ef189813a3b9061c2a90ba86a32f44
https://github.com/llvm/llvm-project/commit/3d3abc22b3ef189813a3b9061c2a90ba86a32f44
Author: serge-sans-paille <sguelton at redhat.com>
Date: 2021-05-20 (Thu, 20 May 2021)
Changed paths:
M llvm/include/llvm/ADT/Any.h
Log Message:
-----------
Force visibility of llvm::Any to external
llvm::Any::TypeId::Id relies on the uniqueness of the address of a static
variable defined in a template function. hidden visibility implies vague linkage
for that variable, which does not guarantee the uniqueness of the address across
a binary and a shared library. This totally breaks the implementation of
llvm::Any.
Ideally, setting visibility to llvm::Any::TypeId::Id should be enough,
unfortunately this doesn't work as expected and we lack time (before 12.0.1
release) to understand why setting the visibility to llvm::Any does work.
See https://gcc.gnu.org/wiki/Visibility and
https://gcc.gnu.org/onlinedocs/gcc/Vague-Linkage.html
for more information on that topic.
Differential Revision: https://reviews.llvm.org/D101972
More information about the All-commits
mailing list