[ThinLTO] Clear dllimport when setting dso_local.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 13 Mar 2018 15:24:51 +0000 (15:24 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 13 Mar 2018 15:24:51 +0000 (15:24 +0000)
commitf5220fb68f2baef2e6d2e0bf11c12caa9e22ef29
tree9ee057ff5c8c81851f1d9d36818a9672242b72b1
parent3d4c86d399b9d6fd22dc2ee8dbe08a5eb96218d1
[ThinLTO] Clear dllimport when setting dso_local.

This is PR36686.

If a user of a library is LTOed with that library we take the
opportunity to set dso_local, but we don't clear dllimport, which
creates an invalid IR.

llvm-svn: 327408
llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
llvm/test/ThinLTO/X86/Inputs/dsolocal_dllimport.ll [new file with mode: 0644]
llvm/test/ThinLTO/X86/dsolocal_dllimport.ll [new file with mode: 0644]