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 origin/main HEAD --extensions cpp,h -- 
llvm/include/llvm/IR/ObjCClassHierarchy.h 
llvm/include/llvm/Transforms/IPO/ObjCConstantIvarOffset.h 
llvm/lib/IR/ObjCClassHierarchy.cpp 
llvm/lib/Transforms/IPO/ObjCConstantIvarOffset.cpp 
llvm/include/llvm/Bitcode/LLVMBitCodes.h 
llvm/include/llvm/IR/ModuleSummaryIndex.h 
llvm/include/llvm/IR/ModuleSummaryIndexYAML.h 
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp 
llvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp 
llvm/lib/Bitcode/Reader/BitcodeReader.cpp 
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp llvm/lib/LTO/LTO.cpp 
llvm/lib/LTO/ThinLTOCodeGenerator.cpp llvm/lib/Passes/PassBuilder.cpp 
llvm/lib/Passes/PassBuilderPipelines.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h 
b/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
index df336c4e6..fe00ae15e 100644
--- a/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
+++ b/llvm/include/llvm/IR/ModuleSummaryIndexYAML.h
@@ -355,12 +355,9 @@ LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::StringAndGUID)
 namespace llvm {
 namespace yaml {
 
-template <>
-struct CustomMappingTraits<
-    std::map<uint64_t, ObjCClassInfo>> {
-  static void inputOne(
-      IO &io, StringRef Key,
-      std::map<uint64_t, ObjCClassInfo> &V) {
+template <> struct CustomMappingTraits<std::map<uint64_t, ObjCClassInfo>> {
+  static void inputOne(IO &io, StringRef Key,
+                       std::map<uint64_t, ObjCClassInfo> &V) {
     uint64_t KeyInt;
     if (Key.getAsInteger(0, KeyInt)) {
       io.setError("key not an integer");
@@ -368,9 +365,7 @@ struct CustomMappingTraits<
     }
     io.mapRequired(Key, V[KeyInt]);
   }
-  static void output(
-      IO &io,
-      std::map<uint64_t, ObjCClassInfo> &V) {
+  static void output(IO &io, std::map<uint64_t, ObjCClassInfo> &V) {
     for (auto &P : V)
       io.mapRequired(llvm::utostr(P.first), P.second);
   }
diff --git a/llvm/include/llvm/IR/ObjCClassHierarchy.h 
b/llvm/include/llvm/IR/ObjCClassHierarchy.h
index e3b56b7e9..43a7e8caf 100644
--- a/llvm/include/llvm/IR/ObjCClassHierarchy.h
+++ b/llvm/include/llvm/IR/ObjCClassHierarchy.h
@@ -42,8 +42,10 @@ public:
 
   // Emit per-module ObjC class summary records during module summary analysis.
   static void exportToSummary(const Module &M, ModuleSummaryIndex &Index);
-  // Pre-slide the hierarchy graph materialized in this map; unreachable 
classes are erased.
-  static void resolveHierarchy(DenseMap<GlobalValue::GUID, ObjCClassInfo> 
&Classes);
+  // Pre-slide the hierarchy graph materialized in this map; unreachable 
classes
+  // are erased.
+  static void
+  resolveHierarchy(DenseMap<GlobalValue::GUID, ObjCClassInfo> &Classes);
 
   ArrayRef<ResolvedClass> getResolvedClasses() const { return Resolved; }
   bool empty() const { return Resolved.empty(); }
diff --git a/llvm/lib/IR/ObjCClassHierarchy.cpp 
b/llvm/lib/IR/ObjCClassHierarchy.cpp
index a2fc67390..91ef83c0c 100644
--- a/llvm/lib/IR/ObjCClassHierarchy.cpp
+++ b/llvm/lib/IR/ObjCClassHierarchy.cpp
@@ -78,8 +78,8 @@ struct ParsedClassInfo {
 
 } // end anonymous namespace
 
-// Extract raw layout info from a _class_t global by walking the ObjC ABI v2 
struct chain.
-// Return nullopt if _class_t is malformed.
+// Extract raw layout info from a _class_t global by walking the ObjC ABI v2
+// struct chain. Return nullopt if _class_t is malformed.
 static std::optional<ParsedClassInfo>
 parseClassInfo(const GlobalVariable *ClassGV) {
   //   _class_t: { isa, superclass, cache, vtable, ro_data }
@@ -138,7 +138,8 @@ parseClassInfo(const GlobalVariable *ClassGV) {
   return Info;
 }
 
-// Pre-slide the hierarchy graph materialized in this map; unreachable classes 
are erased.
+// Pre-slide the hierarchy graph materialized in this map; unreachable classes
+// are erased.
 void ObjCClassHierarchy::resolveHierarchy(
     DenseMap<GlobalValue::GUID, ObjCClassInfo> &Classes) {
   if (Classes.empty())
diff --git a/llvm/lib/Transforms/IPO/ObjCConstantIvarOffset.cpp 
b/llvm/lib/Transforms/IPO/ObjCConstantIvarOffset.cpp
index 55988fe01..51f74be86 100644
--- a/llvm/lib/Transforms/IPO/ObjCConstantIvarOffset.cpp
+++ b/llvm/lib/Transforms/IPO/ObjCConstantIvarOffset.cpp
@@ -21,7 +21,6 @@
 
 using namespace llvm;
 
-
 // Collects ivar offset globals owned by this class's _class_ro_t,
 static SmallVector<GlobalVariable *, 4>
 collectIvarOffsetGlobals(GlobalVariable &ROGV) {
@@ -35,8 +34,8 @@ collectIvarOffsetGlobals(GlobalVariable &ROGV) {
   if (!ROStruct || ROStruct->getNumOperands() < 8)
     return Offsets;
 
-  auto *IvarListGV =
-      
dyn_cast_or_null<GlobalVariable>(ROStruct->getOperand(7)->stripPointerCasts());
+  auto *IvarListGV = dyn_cast_or_null<GlobalVariable>(
+      ROStruct->getOperand(7)->stripPointerCasts());
   if (!IvarListGV || !IvarListGV->hasInitializer())
     return Offsets;
 
@@ -72,8 +71,7 @@ applyResolvedLayout(const ObjCClassHierarchy::ResolvedClass 
&Class) {
   auto *ROStruct = cast<ConstantStruct>(ROGV.getInitializer());
   uint32_t OldStart =
       cast<ConstantInt>(ROStruct->getOperand(1))->getZExtValue();
-  uint32_t OldSize =
-      cast<ConstantInt>(ROStruct->getOperand(2))->getZExtValue();
+  uint32_t OldSize = 
cast<ConstantInt>(ROStruct->getOperand(2))->getZExtValue();
 
   uint32_t Diff = InstanceStart - OldStart;
   bool Changed = false;

``````````

</details>


https://github.com/llvm/llvm-project/pull/205970
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to