[llvm] [PGO] Instrument modules with at least a single function definition (PR #93421)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 26 10:45:37 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 cda5790e38af5da3ad455eddab36ef16bf3e8104 4d46fc30ce51396413d42d9d84a77704508a09fe -- llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp b/llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp
index 670a869ea7..33eb3895d9 100644
--- a/llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp
+++ b/llvm/unittests/Transforms/Instrumentation/PGOInstrumentationTest.cpp
@@ -19,15 +19,15 @@ namespace {
using namespace llvm;
+using testing::_;
using ::testing::DoDefault;
using ::testing::Invoke;
-using ::testing::NotNull;
using ::testing::IsNull;
+using ::testing::NotNull;
using ::testing::Ref;
using ::testing::Return;
using ::testing::Sequence;
using ::testing::Test;
-using testing::_;
template <typename Derived> class MockAnalysisHandleBase {
public:
@@ -40,6 +40,7 @@ public:
ModuleAnalysisManager::Invalidator &Inv) {
return Handle->invalidate(M, PA, Inv);
}
+
private:
explicit Result(Derived *Handle) : Handle(Handle) {}
@@ -61,9 +62,7 @@ public:
explicit Analysis(Derived *Handle) : Handle(Handle) {}
};
- Analysis getAnalysis() {
- return Analysis(static_cast<Derived *>(this));
- }
+ Analysis getAnalysis() { return Analysis(static_cast<Derived *>(this)); }
typename Analysis::Result getResult() {
return typename Analysis::Result(static_cast<Derived *>(this));
``````````
</details>
https://github.com/llvm/llvm-project/pull/93421
More information about the llvm-commits
mailing list