[compiler-rt] [compiler-rt][ctx_instr] Add `ctx_profile` component (PR #89304)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 13:39:35 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 e772a268ef75332b72dd9b9ca0341a6af8b0db72 77c8ad298a7e3815714cf8a19a22bdd04aca62d4 -- compiler-rt/lib/ctx_profile/CtxInstrProfiling.cpp compiler-rt/lib/ctx_profile/CtxInstrProfiling.h compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp compiler-rt/lib/ctx_profile/tests/driver.cpp
``````````

</details>

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

``````````diff
diff --git a/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h b/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
index 0ad4ef80cd..c1789c32a6 100644
--- a/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
+++ b/compiler-rt/lib/ctx_profile/CtxInstrProfiling.h
@@ -22,7 +22,7 @@ public:
   // to, assumed to be the last in the Arena list. We only need to support
   // appending to the arena list.
   static Arena *allocateNewArena(size_t Size, Arena *Prev = nullptr);
-  static void freeArenaList(Arena*& A);
+  static void freeArenaList(Arena *&A);
 
   uint64_t size() const { return Size; }
 
@@ -51,5 +51,5 @@ private:
   const uint64_t Size;
 };
 
-}
+} // namespace __ctx_profile
 #endif // CTX_PROFILE_CTXINSTRPROFILING_H_
diff --git a/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp b/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
index 1e7ddfadd8..44f37d2576 100644
--- a/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
+++ b/compiler-rt/lib/ctx_profile/tests/CtxInstrProfilingTest.cpp
@@ -4,11 +4,11 @@
 using namespace __ctx_profile;
 
 TEST(ArenaTest, Basic) {
-  Arena * A = Arena::allocateNewArena(1024);
+  Arena *A = Arena::allocateNewArena(1024);
   EXPECT_EQ(A->size(), 1024U);
   EXPECT_EQ(A->next(), nullptr);
 
-  auto *M1 = A->tryBumpAllocate(1020); 
+  auto *M1 = A->tryBumpAllocate(1020);
   EXPECT_NE(M1, nullptr);
   auto *M2 = A->tryBumpAllocate(4);
   EXPECT_NE(M2, nullptr);

``````````

</details>


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


More information about the llvm-commits mailing list