This is an archive of the discontinued LLVM Phabricator instance.

Improves x86 interrupt error message on argument type error
AcceptedPublic

Authored by remexre on Apr 23 2018, 12:54 AM.

Details

Summary

Currently if you define an interrupt handler with the right arity but wrong type, you get the unhelpful error "X86 interrupts may take one or two arguments." This changes the message for type errors to call them out as such.

Diff Detail

Event Timeline

remexre created this revision.Apr 23 2018, 12:54 AM
remexre updated this revision to Diff 143505.Apr 23 2018, 12:57 AM

Accidentally used hard tabs; now using spaces only.

LGTM.
@Craig what do you think?

danilaml added inline comments.
lib/Target/X86/X86ISelLowering.cpp
2997

What if Ins.size() == 1?

craig.topper added inline comments.Apr 23 2018, 9:48 AM
lib/Target/X86/X86ISelLowering.cpp
2994–2995

Since you're touching this code anyway, do you mind capitalizing the new variable names to match coding standards.

remexre updated this revision to Diff 143597.Apr 23 2018, 10:20 AM

Changes variable names, readds Ins.size() check.

danilaml added inline comments.Apr 23 2018, 10:31 AM
lib/Target/X86/X86ISelLowering.cpp
2997

Wouldn't it now always fail if Ins.size() == 1 ?

remexre updated this revision to Diff 143602.Apr 23 2018, 10:53 AM
remexre marked 2 inline comments as done.

fixes dumb bool mistake

I see no changes between Diff 143597 and Diff 143602.

I see no changes between Diff 143597 and Diff 143602.

Yeah, sorry, I screwed up the git format-patch command... I'm used to the GitHub PR model...

remexre updated this revision to Diff 143606.Apr 23 2018, 11:38 AM
This revision is now accepted and ready to land.Apr 23 2018, 5:28 PM