This is an archive of the discontinued LLVM Phabricator instance.

Fix for PR46384. Failure on weak dllimport.
ClosedPublic

Authored by Sunil_Srivastava on Aug 31 2020, 9:47 PM.

Details

Summary

The patch simply relaxes the check. I think it is OK to have dllimport-weak-externals.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 31 2020, 9:47 PM
Sunil_Srivastava requested review of this revision.Aug 31 2020, 9:47 PM
Sunil_Srivastava retitled this revision from Fix for PR46384 to Fix for PR46384. Failure on weak dllimport..Sep 1 2020, 8:22 AM
wristow added inline comments.Sep 1 2020, 11:52 AM
llvm/lib/IR/Verifier.cpp
593

This relaxation of the assertion-check LGTM.

llvm/test/Verifier/weak-dllimport.ll
2

This test seems somewhat complicated. Can it be simplified significantly, and still trigger the problem?

llvm/test/Verifier/weak-dllimport.ll
2

Yes it can be simplified. Most of the executable code and attributes can go away. It will lose its connection to the source though. Is that preferred ?

wristow added inline comments.Sep 1 2020, 1:44 PM
llvm/test/Verifier/weak-dllimport.ll
2

IMO, yes that's preferred.

Leaving a fragment of source in as a comment to show how the situation came about is fine. But simplifying the IR of the test so it focuses on the problem makes it clearer to me.

Simplified the test case.

wristow accepted this revision.Sep 1 2020, 6:45 PM

Simplified the test case.

Thanks. The reduced test looks good.

Overall: LGTM.

This revision is now accepted and ready to land.Sep 1 2020, 6:45 PM

Tweaked the test to specifically look for the error of interest

Tweaked the test to specifically look for the error of interest

LGTM

This revision was automatically updated to reflect the committed changes.
Sunil_Srivastava marked 2 inline comments as done.