[PATCH] D42334: [NFC] Refactor Apple Accelerator Tables

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 08:33:59 PST 2018


aprantl added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.h:69
 
+/// Representation of the header of an accelerator table. This consists of the
+/// fixed header and the header data. The latter contains the atoms which
----------------
Can you be specific as to which variant of accel table this is referring to?


================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.h:100
 public:
-  // The HeaderData describes the form of each set of data. In general this
-  // is as a list of atoms (atom_count) where each atom contains a type
-  // (AtomType type) of data, and an encoding form (form). In the case of
-  // data that is referenced via DW_FORM_ref_* the die_offset_base is
-  // used to describe the offset for all forms in the list of atoms.
-  // This also serves as a public interface of sorts.
-  // When written to disk this will have the form:
-  //
-  // uint32_t die_offset_base
-  // uint32_t atom_count
-  // atom_count Atoms
-
-  // Make these public so that they can be used as a general interface to
-  // the class.
+  /// An Atom defines the form of the data in the accelerator table. You can
+  /// think of it as a column with a specification of its form.
----------------
... Conceptually it is a column with ...


================
Comment at: lib/CodeGen/AsmPrinter/DwarfAccelTable.h:324
+  DA.Name = Name;
+  DA.Values.push_back(new (Allocator) DataT(D));
+}
----------------
This is just me being curious: Would it make sense to have users pass the `new (Allocator) DataT(D)` and not make this a template at all?


https://reviews.llvm.org/D42334





More information about the llvm-commits mailing list