[PATCH] D89913: SourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 21 14:39:20 PDT 2020


dexonsmith created this revision.
dexonsmith added a reviewer: shafik.
Herald added a subscriber: ributzka.
dexonsmith requested review of this revision.

Put the guts of `ComputeLineNumbers` into `LineOffsetMapping::get` and
`LineOffsetMapping::LineOffsetMapping`.  As a drive-by, store the number
of lines directly in the bump-ptr-allocated array.


https://reviews.llvm.org/D89913

Files:
  clang/include/clang/Basic/SourceManager.h
  clang/lib/Basic/SourceManager.cpp
  clang/lib/Lex/ScratchBuffer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89913.299810.patch
Type: text/x-patch
Size: 7444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201021/67808d42/attachment.bin>


More information about the cfe-commits mailing list