Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[CAS] Add llvm-cas tools to inspect on-disk LLVMCAS #114104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: users/cachemeifyoucan/spr/main.cas-add-llvm-cas-tools-to-inspect-on-disk-llvmcas-2
Choose a base branch
from

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
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 7792cf341a8c8f8bb3149be2c686333636a28b67 b35fe10335c9a5c6ab660310799d0c787b67d4e4 --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) {

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