mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 06:06:06 +00:00

As suggested by Reid: - class has GVA_Internal linkage -> internal - thunk has return adjustment -> weak_odr, to handle evil corner case [1] - all other normal methods -> linkonce_odr 1. Evil corner case: struct Incomplete; struct A { int a; virtual A *bar(); }; struct B { int b; virtual B *foo(Incomplete); }; struct C : A, B { int c; virtual C *foo(Incomplete); }; C c; Here, the thunk for C::foo() will be emitted when C::foo() is defined, which might be in a different translation unit, so it needs to be weak_odr. Differential Revision: http://reviews.llvm.org/D3992 llvm-svn: 210368
Description
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
Languages
LLVM
39.9%
C++
32.5%
C
13.5%
Assembly
9.4%
MLIR
1.4%
Other
2.8%