This is an archive of the discontinued LLVM Phabricator instance.

[TableGen] Fix invalid comparison function `SizeOrder` in `getMatchingSubClassWithSubRegs`
ClosedPublic

Authored by TaWeiTu on Sep 13 2020, 11:14 PM.

Details

Reviewers
arsenm
dsanders
Summary

Building LLVM with -DEXPENSIVE_CHECKS fails with the following error message with libstdc++ in debug mode:

Error: comparison doesn't meet irreflexive requirements, assert(!(a < a)).

The patch fixes the comparison function SizeOrder by returning false when comparing two equal items.

Diff Detail

Event Timeline

TaWeiTu created this revision.Sep 13 2020, 11:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 13 2020, 11:14 PM
TaWeiTu requested review of this revision.Sep 13 2020, 11:14 PM
arsenm accepted this revision.Sep 14 2020, 8:51 AM
This revision is now accepted and ready to land.Sep 14 2020, 8:51 AM

Hi @arsenm, thank you for the review! Can you commit this for me? Because I don't have the commit access yet. Thanks!

Hi @arsenm, thank you for the review! Can you commit this for me? Because I don't have the commit access yet. Thanks!

Name and email for the author?

Oh, I forgot about it. --author="Ta-Wei Tu <tu.da.wei@gmail.com>", thanks!