Skip to content
Snippets Groups Projects
  • Saleem Abdulrasool's avatar
    e13e0e40
    CodeGen: fix runtime function dll storage · e13e0e40
    Saleem Abdulrasool authored
    Properly attribute DLL storage to runtime functions.  When generating the
    runtime function, scan for an existing declaration which may provide an explicit
    declaration (local storage) or a DLL import or export storage from the user.
    Honour that if available.  Otherwise, if building with a local visibility of the
    public or standard namespaces (-flto-visibility-public-std), give the symbols
    local storage (it indicates a /MT[d] link, so static runtime).  Otherwise,
    assume that the link is dynamic, and give the runtime function dllimport
    storage.
    
    This allows for implementations to get the correct storage as long as they are
    properly declared, the user to override the import storage, and in case no
    explicit storage is given, use of the import storage.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289776 91177308-0d34-0410-b5e6-96231b3b80d8
    e13e0e40
    History
    CodeGen: fix runtime function dll storage
    Saleem Abdulrasool authored
    Properly attribute DLL storage to runtime functions.  When generating the
    runtime function, scan for an existing declaration which may provide an explicit
    declaration (local storage) or a DLL import or export storage from the user.
    Honour that if available.  Otherwise, if building with a local visibility of the
    public or standard namespaces (-flto-visibility-public-std), give the symbols
    local storage (it indicates a /MT[d] link, so static runtime).  Otherwise,
    assume that the link is dynamic, and give the runtime function dllimport
    storage.
    
    This allows for implementations to get the correct storage as long as they are
    properly declared, the user to override the import storage, and in case no
    explicit storage is given, use of the import storage.
    
    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289776 91177308-0d34-0410-b5e6-96231b3b80d8
Code owners
Assign users and groups as approvers for specific file changes. Learn more.