[ThinLTO] Remove dllimport attribute from locally defined symbols
authorMatthew Voss <matthew.voss@sony.com>
Wed, 19 Dec 2018 19:07:45 +0000 (19:07 +0000)
committerMatthew Voss <matthew.voss@sony.com>
Wed, 19 Dec 2018 19:07:45 +0000 (19:07 +0000)
commit62fcfc5adb99bebdb90a397fc2dfc8652dd0de6f
treed9b8de5347b773a28b85e7df560fbd7b5801ceeb
parentebaba9df3ad61e2c5daddbbcbbf677c62b242c16
[ThinLTO] Remove dllimport attribute from locally defined symbols

Summary:
The LTO/ThinLTO driver currently creates invalid bitcode by setting
symbols marked dllimport as dso_local. The compiler often has access
to the definition (often dllexport) and the declaration (often
dllimport) of an object at link-time, leading to a conflicting
declaration. This patch resolves the inconsistency by removing the
dllimport attribute.

Reviewers: tejohnson, pcc, rnk, echristo

Reviewed By: rnk

Subscribers: dmikulin, wristow, mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, dang, llvm-commits

Differential Revision: https://reviews.llvm.org/D55627

llvm-svn: 349667
llvm/lib/LTO/LTO.cpp
llvm/test/LTO/Resolution/X86/local-def-dllimport.ll [new file with mode: 0644]