[llvm-branch-commits] [llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon May 19 00:12:21 PDT 2025


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 HEAD~1 HEAD --extensions cpp,h -- llvm/include/llvm/ProfileData/MemProfCommon.h llvm/include/llvm/Analysis/MemoryProfileInfo.h llvm/include/llvm/IR/ModuleSummaryIndex.h llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/include/llvm/Analysis/MemoryProfileInfo.h b/llvm/include/llvm/Analysis/MemoryProfileInfo.h
index 33d59efe8..9fcb81a0a 100644
--- a/llvm/include/llvm/Analysis/MemoryProfileInfo.h
+++ b/llvm/include/llvm/Analysis/MemoryProfileInfo.h
@@ -13,9 +13,9 @@
 #ifndef LLVM_ANALYSIS_MEMORYPROFILEINFO_H
 #define LLVM_ANALYSIS_MEMORYPROFILEINFO_H
 
+#include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/Metadata.h"
 #include "llvm/ProfileData/MemProfCommon.h"
-#include "llvm/IR/InstrTypes.h"
 #include <map>
 
 namespace llvm {
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h
index 77430c5cb..23f9504b4 100644
--- a/llvm/include/llvm/IR/ModuleSummaryIndex.h
+++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h
@@ -307,8 +307,6 @@ template <> struct DenseMapInfo<ValueInfo> {
   static unsigned getHashValue(ValueInfo I) { return hash_value(I.getRef()); }
 };
 
-
-
 /// Summary of memprof callsite metadata.
 struct CallsiteInfo {
   // Actual callee function.
diff --git a/llvm/include/llvm/ProfileData/MemProfCommon.h b/llvm/include/llvm/ProfileData/MemProfCommon.h
index 4097ccb65..a638824ec 100644
--- a/llvm/include/llvm/ProfileData/MemProfCommon.h
+++ b/llvm/include/llvm/ProfileData/MemProfCommon.h
@@ -39,6 +39,5 @@ enum class AllocationType : uint8_t {
 };
 
 } // namespace llvm
- 
-#endif // LLVM_PROFILEDATA_MEMPROFCOMMON_H
 
+#endif // LLVM_PROFILEDATA_MEMPROFCOMMON_H

``````````

</details>


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


More information about the llvm-branch-commits mailing list