[all-commits] [llvm/llvm-project] dbbc4f: SourceManager: Encapsulate line number mapping int...
Duncan P. N. Exon Smith via All-commits
all-commits at lists.llvm.org
Fri Oct 23 09:56:13 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: dbbc4f4e226be44e484f448be2d308d205c81038
https://github.com/llvm/llvm-project/commit/dbbc4f4e226be44e484f448be2d308d205c81038
Author: Duncan P. N. Exon Smith <dexonsmith at apple.com>
Date: 2020-10-23 (Fri, 23 Oct 2020)
Changed paths:
M clang/include/clang/Basic/SourceManager.h
M clang/lib/Basic/SourceManager.cpp
M clang/lib/Lex/ScratchBuffer.cpp
M clang/unittests/Basic/CMakeLists.txt
A clang/unittests/Basic/LineOffsetMappingTest.cpp
Log Message:
-----------
SourceManager: Encapsulate line number mapping into SrcMgr::LineOffsetMapping
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.
Differential Revision: https://reviews.llvm.org/D89913
More information about the All-commits
mailing list