Skip to content

Conversation

@cachemeifyoucan
Copy link
Collaborator

Add a command-line tool llvm-cas to inspect the OnDisk CAS for
debugging purpose. It can be used to lookup/update ObjectStore or
put/get cache entries from ActionCache, together with other debugging
capabilities.

Created using spr 1.3.5
@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff 38e5c8c7c5580224e0b3ae160491a0dcdf84490a ac0662b44cde12758c3e1be946651151938ee846 --extensions cpp -- llvm/tools/llvm-cas/llvm-cas.cpp
View the diff from clang-format here.
diff --git a/llvm/tools/llvm-cas/llvm-cas.cpp b/llvm/tools/llvm-cas/llvm-cas.cpp
index 291c6faf9f..b3dd0bb1f3 100644
--- a/llvm/tools/llvm-cas/llvm-cas.cpp
+++ b/llvm/tools/llvm-cas/llvm-cas.cpp
@@ -133,13 +133,12 @@ int main(int Argc, char **Argv) {
   return validateObject(*CAS, ID);
 }
 
-static Expected<std::unique_ptr<MemoryBuffer>>
-openBuffer(StringRef DataPath) {
+static Expected<std::unique_ptr<MemoryBuffer>> openBuffer(StringRef DataPath) {
   if (DataPath.empty())
     return createStringError(inconvertibleErrorCode(), "--data missing");
-  return errorOrToExpected(
-      DataPath == "-" ? llvm::MemoryBuffer::getSTDIN()
-                      : llvm::MemoryBuffer::getFile(DataPath));
+  return errorOrToExpected(DataPath == "-"
+                               ? llvm::MemoryBuffer::getSTDIN()
+                               : llvm::MemoryBuffer::getFile(DataPath));
 }
 
 int dump(ObjectStore &CAS) {

@cachemeifyoucan cachemeifyoucan deleted the users/cachemeifyoucan/spr/cas-add-llvm-cas-tools-to-inspect-on-disk-llvmcas-1 branch October 29, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants