diff options
author | Kazu Hirata <kazu@google.com> | 2023-01-28 12:41:19 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2023-01-28 12:41:20 -0800 |
commit | 55e2cd16095d64e9afca6e109e40ed95d735dc7f (patch) | |
tree | c61699df07a76b98d99ed93dfb95d0e003b0956a /clang/lib/Basic/SourceManager.cpp | |
parent | a536d3e40e088ab725c6d2e6c0b8ca21451b511c (diff) | |
download | llvm-55e2cd16095d64e9afca6e109e40ed95d735dc7f.zip llvm-55e2cd16095d64e9afca6e109e40ed95d735dc7f.tar.gz llvm-55e2cd16095d64e9afca6e109e40ed95d735dc7f.tar.bz2 |
Use llvm::count{lr}_{zero,one} (NFC)
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 3d7a538..f4ddae1 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -1302,8 +1302,7 @@ LineOffsetMapping LineOffsetMapping::get(llvm::MemoryBufferRef Buffer, // in [\n, \r + 1 [ // Scan for the next newline - it's very likely there's one. - unsigned N = - llvm::countTrailingZeros(Mask) - 7; // -7 because 0x80 is the marker + unsigned N = llvm::countr_zero(Mask) - 7; // -7 because 0x80 is the marker Word >>= N; Buf += N / 8 + 1; unsigned char Byte = Word; |