Internal testing showed that the change made in commit 62fcfc5a needed more test coverage. Specifically, the imported function shouldn't be externally visible and the whole test needed to be run in regular LTO mode.
Details
Diff Detail
Event Timeline
The original patch (D55627) added test/LTO/Resolution/X86/local-def-dllimport.ll, which tested ThinLTO. Does that test need to be changed? Is the main issue that we were only testing ThinLTO and not regular LTO?
No, I don't think we need to modify the original test. It's now used to test the changes in d2ef8c1f.
lgtm
Ah I see. Looks like that test was then actually testing the similar support in llvm/lib/Transforms/Utils/FunctionImportUtils.cpp (which is why it was affected by d2ef8c1f aka D74751), and not the support in LTO.cpp added in D55627. Which makes me wonder if we now have any tests covering the removal of the dllimport in FunctionImportUtils.cpp... After looking, that was added in f5220fb68f2baef2e6d2e0bf11c12caa9e22ef29 and there was a test added with it (llvm/test/ThinLTO/X86/dsolocal_dllimport.ll). Can you make sure that test is still testing the handling in FunctionImportUtils.cpp, and also add a comment to llvm/test/LTO/Resolution/X86/local-def-dllimport.ll as to what it is actually testing (which I guess is that we *don't* remove the dllimport if we didn't mark a def as dso_local during the function import handling?).