This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Use parseDirective returning ternary status (NFC)
ClosedPublic

Authored by barannikov88 on Jun 30 2023, 7:13 PM.

Details

Diff Detail

Event Timeline

barannikov88 created this revision.Jun 30 2023, 7:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2023, 7:13 PM
barannikov88 requested review of this revision.Jun 30 2023, 7:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2023, 7:13 PM
barannikov88 edited the summary of this revision. (Show Details)Jun 30 2023, 7:14 PM
barannikov88 edited the summary of this revision. (Show Details)

Fix parseDirectiveAttribute returning success after emitting an error

jrtc27 added inline comments.Jun 30 2023, 8:07 PM
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2975

Is this not a separate change?

llvm/test/MC/RISCV/invalid-attribute.s
10 ↗(On Diff #536497)

Test should probably go in separately first to show it's not a behavioural change and just a bug in the conversion(?)

barannikov88 added inline comments.Jul 1 2023, 10:57 AM
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
2975

As long as there was a error, the returned value didn't matter. Now returning false after emitting an error triggers an assertion.

llvm/test/MC/RISCV/invalid-attribute.s
10 ↗(On Diff #536497)

I've precommitted the test, c2d7ee79.

barannikov88 retitled this revision from [RISCV] Use parseDirective returning ternary status to [RISCV] Use parseDirective returning ternary status (NFC).Jul 1 2023, 10:57 AM
asb accepted this revision.Jul 3 2023, 3:26 AM

LGTM

This revision is now accepted and ready to land.Jul 3 2023, 3:26 AM