[llvm] [DebugCounter] Add support for non-continous ranges. (PR #89470)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 19 15:53:36 PDT 2024


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 adc11b34b1d7f99b3931f945073a652f0dec5aaf 03e83fbaea12acbe3b26a4ad66a97fbcff8b6412 -- llvm/tools/delta-driver/delta-driver.cpp llvm/include/llvm/IR/PassManager.h llvm/include/llvm/Support/DebugCounter.h llvm/lib/IR/PassManager.cpp llvm/lib/Support/DebugCounter.cpp llvm/unittests/Support/DebugCounterTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/Support/DebugCounter.h b/llvm/include/llvm/Support/DebugCounter.h
index adafde1e16..5da3deb621 100644
--- a/llvm/include/llvm/Support/DebugCounter.h
+++ b/llvm/include/llvm/Support/DebugCounter.h
@@ -57,14 +57,14 @@ class raw_ostream;
 struct Chunk {
   int64_t Begin;
   int64_t End;
-  void print(llvm::raw_ostream& OS);
+  void print(llvm::raw_ostream &OS);
   bool contains(int64_t Idx) { return Idx >= Begin && Idx <= End; }
 };
 
 void printChunks(raw_ostream &OS, ArrayRef<Chunk>);
 
 /// Return true on parsing error and print the error message on the llvm::errs()
-bool parseChunks(StringRef Str, SmallVector<Chunk>& Res);
+bool parseChunks(StringRef Str, SmallVector<Chunk> &Res);
 
 class DebugCounter {
 public:
diff --git a/llvm/lib/Support/DebugCounter.cpp b/llvm/lib/Support/DebugCounter.cpp
index 889da1c657..d62f1889fa 100644
--- a/llvm/lib/Support/DebugCounter.cpp
+++ b/llvm/lib/Support/DebugCounter.cpp
@@ -82,7 +82,7 @@ bool parseChunks(StringRef Str, SmallVector<Chunk> &Chunks) {
   }
   return false;
 }
-}
+} // namespace llvm
 
 namespace {
 // This class overrides the default list implementation of printing so we

``````````

</details>


https://github.com/llvm/llvm-project/pull/89470


More information about the llvm-commits mailing list