diff options
author | serge-sans-paille <sguelton@redhat.com> | 2021-02-23 20:46:35 +0100 |
---|---|---|
committer | serge-sans-paille <sguelton@redhat.com> | 2021-03-01 10:18:36 +0100 |
commit | 80e8efd563fda4d7b125b834d3243b3ef9a05270 (patch) | |
tree | dbf251ea2631ce3173a82ddbf832d86e3925b57d /llvm/lib/Support/StringMap.cpp | |
parent | 588db1ccff713332c1f9358f423e682f18c06e8e (diff) | |
download | llvm-80e8efd563fda4d7b125b834d3243b3ef9a05270.zip llvm-80e8efd563fda4d7b125b834d3243b3ef9a05270.tar.gz llvm-80e8efd563fda4d7b125b834d3243b3ef9a05270.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/Support/StringMap.cpp')
0 files changed, 0 insertions, 0 deletions