This is an archive of the discontinued LLVM Phabricator instance.

[mlir:LSP] Improve conversion between SourceMgr and LSP locations
ClosedPublic

Authored by rriddle on Apr 27 2022, 5:34 PM.

Details

Summary

SourceMgr generally uses 1-based locations, whereas the LSP is zero based.
This commit corrects this conversion and also enhances the conversion from SMLoc
to SMRange to support string tokens.

Depends on D124583

Diff Detail

Event Timeline

rriddle created this revision.Apr 27 2022, 5:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 5:34 PM
rriddle requested review of this revision.Apr 27 2022, 5:34 PM
jpienaar accepted this revision.Apr 28 2022, 5:54 AM
jpienaar added inline comments.
mlir/lib/Parser/AsmParserState.cpp
125

Function comment?

This revision is now accepted and ready to land.Apr 28 2022, 5:54 AM
rriddle marked an inline comment as done.Apr 28 2022, 10:51 AM
rriddle added inline comments.
mlir/lib/Parser/AsmParserState.cpp
125

Ooops, thanks.

This revision was landed with ongoing or failed builds.Apr 28 2022, 12:58 PM
This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.