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.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This appears to affect our behavior under the MS ABI. We still seem to use this logic from CGVTables, even though that code is primarily Itanium related. In http://crbug.com/738468 we're seeing the LNK4102 linker warning, which says: "export of deleting destructor (name); image may not run correctly". You might want to take a look at that warning and reconsider whether this is something you want to do or not. MSVC makes it possible to allocate objects in different DLLs with different allocators, pass them across DLL boundaries, and deallocate them correctly if they are deleted through the vtable.
I'm going to revert for now to fix things.
Sorry about the breakage. I'll redo this limiting it to windows-itanium (and add a comment explaining why we want it).