[PATCH] Allow dllimport/dllexport on inline functions and get the linkage right
David Majnemer
david.majnemer at gmail.com
Wed May 14 20:58:12 PDT 2014
I'm a bit concerned with moving the DLLImport/DLLExport related linkage calculation into Sema out of CodeGen. I have a feeling that this will trigger warn_static_local_in_extern_inline when a static local variable inside of a dllimport'd function.
Considering that other things like VTables and RTTI don't rely on the GVALinakge mechanism and will need the ability to "upgrade" some linkage to a DLLImport/DLLExport friendly linkage, I think I'd rather see a DLLImport/DLLExport handled via a function which takes an arbitrary llvm::GlobalVariable linkage and a Decl and figures out what the final linkage should be.
This kind of upgrading is common inside of CodeGen, GetAddrOfGlobalTemporary is a notable example of this.
http://reviews.llvm.org/D3772
More information about the cfe-commits
mailing list