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

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 05:56:22 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.
----------------
s-barannikov wrote:

The documentation doesn't say much about the use of doxygen comments:

> // for normal comments, /// for doxygen documentation comments

> Include descriptive paragraphs for all public interfaces (public classes, member and non-member functions).

and that's all. Could you suggest a good example of how to use them? The code base isn't very consistent.
E.g. should I use doxygen comments only for functions, or for everything that is not in a cpp file (including private enums / structs / constants)?


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


More information about the llvm-commits mailing list