[llvm] [DataLayout] Move '*AlignElem' structs and enum inside DataLayout (NFC) (PR #103723)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 05:25:00 PDT 2024


================
@@ -159,16 +146,19 @@ class DataLayout {
   /// well-defined bitwise representation.
   SmallVector<unsigned, 8> NonIntegralAddressSpaces;
 
-  /// Attempts to set the alignment of the given type. Returns an error
-  /// description on failure.
-  Error setAlignment(AlignTypeEnum AlignType, Align ABIAlign, Align PrefAlign,
-                     uint32_t BitWidth);
+  // Attempts to set the specification for the given type.
+  // Returns an error description on failure.
+  Error setPrimitiveSpec(PrimitiveSpecifier Specifier, uint32_t BitWidth,
+                         Align ABIAlign, Align PrefAlign);
+
+  // Searches for a pointer specification that matches the given address space.
+  // Returns the default address space specification if not found.
+  const PointerSpec &getPointerSpec(uint32_t Spec) const;
----------------
nikic wrote:

```suggestion
  const PointerSpec &getPointerSpec(uint32_t AddrSpace) const;
```

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


More information about the llvm-commits mailing list