This is an archive of the discontinued LLVM Phabricator instance.

SourceManager: Simplify by inlining what remains of ComputeLineNumbers, NFC
ClosedPublic

Authored by dexonsmith on Oct 21 2020, 7:35 PM.

Details

Summary

Use LineOffsetMapping:get directly and remove/inline the helper
ComputeLineNumbers, simplifying the callers.

Diff Detail

Event Timeline

dexonsmith created this revision.Oct 21 2020, 7:35 PM

Found a further simplification, removing a redundant call to ContentCache::getBufferOrNone.

JDevlieghere accepted this revision.Oct 22 2020, 10:34 PM
This revision is now accepted and ready to land.Oct 22 2020, 10:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 23 2020, 11:56 AM