This is an archive of the discontinued LLVM Phabricator instance.

Remove unused parameter from parseMSInlineAsm.
ClosedPublic

Authored by simon_tatham on Jul 6 2021, 9:25 AM.

Details

Summary

No implementation uses the LocCookie parameter at all. Errors are
reported from inside that function by llvm::SourceMgr, and the
instance of that at the clang call site arranges to pass the error
messages back to a ClangAsmParserCallback, which is where the clang
SourceLocation for the error is computed.

(This is part of a patch series working towards the ability to make
SourceLocation into a 64-bit type to handle larger translation units.
But this particular change seems beneficial in its own right.)

Diff Detail

Event Timeline

simon_tatham created this revision.Jul 6 2021, 9:25 AM
simon_tatham requested review of this revision.Jul 6 2021, 9:25 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 6 2021, 9:25 AM
miyuki added a subscriber: miyuki.Jul 6 2021, 10:11 AM
miyuki accepted this revision.Jul 8 2021, 5:49 AM

This change is not part of my original D97204 patch (in D97204, I replaced void *AsmLoc with uint64_t AsmLoc), so I think I am eligible to review the change.

This patch is a small NFC refactoring that removes an unused parameter, therefore, simplifies the code. The parseMSInlineAsm method doesn't have a GNU counterpart, so changing its prototype doesn't break any consistency. The CI failure lock-unrelated.c is, ahem, unrelated (the test does not contain inline assembly).
The patch LGTM, but since Clang isn't our primary area, please wait a few days before committing so that others have time to comment or raise objections.

This revision is now accepted and ready to land.Jul 8 2021, 5:49 AM
akyrtzi removed a reviewer: akyrtzi.Jul 8 2021, 4:40 PM
This revision was landed with ongoing or failed builds.Jul 12 2021, 7:07 AM
This revision was automatically updated to reflect the committed changes.