[all-commits] [llvm/llvm-project] 80e8ef: Use a fast path when initializing LineOffsetMapping
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Mon Mar 1 01:23:55 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 80e8efd563fda4d7b125b834d3243b3ef9a05270
https://github.com/llvm/llvm-project/commit/80e8efd563fda4d7b125b834d3243b3ef9a05270
Author: serge-sans-paille <sguelton at redhat.com>
Date: 2021-03-01 (Mon, 01 Mar 2021)
Changed paths:
M clang/lib/Basic/SourceManager.cpp
Log Message:
-----------
Use a fast path when initializing LineOffsetMapping
Use the fact that the number of line break is lower than printable characters to
guide the optimization process. Also use a fuzzy test that catches both \n and
\r in a single check to speedup the computation.
Differential Revision: https://reviews.llvm.org/D97320
More information about the All-commits
mailing list