[PATCH] Change representation of dllexport/dllimport

Nico Rieck nico.rieck at gmail.com
Fri Jul 5 18:38:49 PDT 2013


Representing dllexport/dllimport as distinct linkage types prevents using these attributes on templates and inline functions.
    
Instead of introducing further mixed linkage types to include linkonce and weak ODR, the old import/export linkage types are replaced with new function attributes (DLLExport, DLLImport) and an extension to global variables:
    
      @Exp = global i32 1, align 4, dllexport
      @Imp = external global i32, dllimport
    
Linkage for dllexported globals and functions is now equal to their linkage without dllexport. Imported globals and functions must be either declarations, or definitions with AvailableExternallyLinkage. An alias is exported if the aliasee is exported.

http://llvm-reviews.chandlerc.com/D1110

Files:
  docs/LangRef.rst
  include/llvm-c/Core.h
  include/llvm/IR/Attributes.h
  include/llvm/IR/GlobalValue.h
  include/llvm/IR/GlobalVariable.h
  lib/AsmParser/LLParser.cpp
  lib/Bitcode/Reader/BitcodeReader.cpp
  lib/Bitcode/Writer/BitcodeWriter.cpp
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/ExecutionEngine/ExecutionEngine.cpp
  lib/IR/AsmWriter.cpp
  lib/IR/Attributes.cpp
  lib/IR/Core.cpp
  lib/IR/Globals.cpp
  lib/IR/Verifier.cpp
  lib/Linker/LinkModules.cpp
  lib/Target/CppBackend/CPPBackend.cpp
  lib/Target/Mangler.cpp
  lib/Target/X86/X86AsmPrinter.cpp
  lib/Target/X86/X86FastISel.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86Subtarget.cpp
  lib/Target/XCore/XCoreAsmPrinter.cpp
  test/CodeGen/X86/dll-linkage.ll
  test/CodeGen/X86/dllexport-x86_64.ll
  test/CodeGen/X86/dllexport.ll
  test/CodeGen/X86/dllimport-x86_64.ll
  test/CodeGen/X86/dllimport.ll
  test/MC/COFF/linker-options.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1110.1.patch
Type: text/x-patch
Size: 40167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130705/f4745481/attachment.bin>


More information about the llvm-commits mailing list