[llvm] [CAS] Add OnDiskTrieRawHashMap (PR #114100)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 15 10:31:04 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/include/llvm/CAS/OnDiskTrieRawHashMap.h llvm/lib/CAS/OnDiskTrieRawHashMap.cpp llvm/unittests/CAS/OnDiskTrieRawHashMapTest.cpp
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CAS/OnDiskTrieRawHashMap.cpp b/llvm/lib/CAS/OnDiskTrieRawHashMap.cpp
index 350ea38d6..18a1c8f82 100644
--- a/llvm/lib/CAS/OnDiskTrieRawHashMap.cpp
+++ b/llvm/lib/CAS/OnDiskTrieRawHashMap.cpp
@@ -1005,9 +1005,9 @@ OnDiskTrieRawHashMap::create(const Twine &PathTwine, const Twine &TrieNameTwine,
// Constructor for if the file doesn't exist.
auto NewDBConstructor = [&](DatabaseFile &DB) -> Error {
- auto Trie = TrieRawHashMapHandle::create(DB.getAlloc(), TrieName,
- NumRootBits, NumSubtrieBits,
- NumHashBits, DataSize);
+ auto Trie =
+ TrieRawHashMapHandle::create(DB.getAlloc(), TrieName, NumRootBits,
+ NumSubtrieBits, NumHashBits, DataSize);
if (LLVM_UNLIKELY(!Trie))
return Trie.takeError();
@@ -1144,7 +1144,7 @@ public:
}
Error printRecord(TrieRawHashMapHandle::RecordData &Record) {
- OS << "- addr=" << (void*)Record.getFileOffset().get() << " ";
+ OS << "- addr=" << (void *)Record.getFileOffset().get() << " ";
if (PrintRecordData) {
PrintRecordData(Record.Proxy.Data);
} else {
@@ -1407,7 +1407,7 @@ public:
}
Expected<MutableArrayRef<char>> allocate(MappedFileRegionArena &Alloc,
- size_t DataSize) {
+ size_t DataSize) {
assert(&Alloc.getRegion() == Region);
auto Ptr = Alloc.allocate(DataSize);
if (LLVM_UNLIKELY(!Ptr))
``````````
</details>
https://github.com/llvm/llvm-project/pull/114100
More information about the llvm-commits
mailing list