[llvm] [IR] Use `const Type*` in DataLayout (PR #70009)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 00:35:47 PDT 2023


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 c45466cd9a51fe384d2b31e124b77d14c821eb70 00e12f4becbea051b2a4c14380c5908fca21052c -- llvm/include/llvm/IR/DataLayout.h llvm/lib/IR/DataLayout.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/IR/DataLayout.cpp b/llvm/lib/IR/DataLayout.cpp
index fb26897e0..44a9a0e33 100644
--- a/llvm/lib/IR/DataLayout.cpp
+++ b/llvm/lib/IR/DataLayout.cpp
@@ -681,7 +681,7 @@ Align DataLayout::getIntegerAlignment(uint32_t BitWidth,
 namespace {
 
 class StructLayoutMap {
-  using LayoutInfoTy = DenseMap<const StructType*, StructLayout*>;
+  using LayoutInfoTy = DenseMap<const StructType *, StructLayout *>;
   LayoutInfoTy LayoutInfo;
 
 public:
@@ -694,9 +694,7 @@ public:
     }
   }
 
-  StructLayout *&operator[](const StructType *STy) {
-    return LayoutInfo[STy];
-  }
+  StructLayout *&operator[](const StructType *STy) { return LayoutInfo[STy]; }
 };
 
 } // end anonymous namespace

``````````

</details>


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


More information about the llvm-commits mailing list