aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/StringMap.cpp
diff options
context:
space:
mode:
authorserge-sans-paille <sguelton@redhat.com>2021-02-23 20:46:35 +0100
committerserge-sans-paille <sguelton@redhat.com>2021-03-01 10:18:36 +0100
commit80e8efd563fda4d7b125b834d3243b3ef9a05270 (patch)
treedbf251ea2631ce3173a82ddbf832d86e3925b57d /llvm/lib/Support/StringMap.cpp
parent588db1ccff713332c1f9358f423e682f18c06e8e (diff)
downloadllvm-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