summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2017-07-24 17:16:27 +0000
committerShoaib Meenai <smeenai@fb.com>2017-07-24 17:16:27 +0000
commitcef66e5281148c5edb8fcabb0515437f761c52bb (patch)
tree00e0f05d4f1f85894bc73a0595bf3048ad65bf2b /lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py
parentad4c5db1efb1c1d85756b2f740742cf8d09baab0 (diff)
downloadbcm5719-llvm-cef66e5281148c5edb8fcabb0515437f761c52bb.tar.gz
bcm5719-llvm-cef66e5281148c5edb8fcabb0515437f761c52bb.zip
[CodeGen] Propagate dllexport to thunks
Under Windows Itanium, we need to export virtual and non-virtual thunks if the functions being thunked are exported. These thunks would previously inherit their dllexport attribute from the declaration, but r298330 changed declarations to not have dllexport attributes. We therefore need to add the dllexport attribute to the definition ourselves now. This is consistent with MinGW GCC's behavior. This redoes r306770 but limits the logic to Itanium. MicrosoftCXXABI's setThunkLinkage ensures that thunks aren't exported under that ABI, so I'm handling this in ItaniumCXXABI's setThunkLinkage for symmetry. We need to export these thunks because they can be referenced outside the library they're defined in. For example, if a child class without a key function inherits from a parent class with a key function, the parent's thunks will only be defined in the library with the key function, but the construction vtable for the parent in the child might be emitted outside the library (since the child doesn't have a key function), and it needs to reference the parent's thunks. We don't need to mark these thunks as imported since any references to them will occur in data, so the compiler can't generate the IAT load sequence anyway. Instead, we rely on the linker generating import thunks for the thunks. Differential Revision: https://reviews.llvm.org/D34972 llvm-svn: 308899
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/scope/TestCppScope.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud