[PATCH] D64407: [DWARF] Simplify constructing of DWARFAttribute. NFC.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 10:42:46 PDT 2019


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFAttribute.h:34
 
-  DWARFAttribute(uint32_t O, dwarf::Attribute A = dwarf::Attribute(0),
-                 dwarf::Form F = dwarf::Form(0)) : Attr(A), Value(F) {}
+  DWARFAttribute() = default;
 
----------------
dblaikie wrote:
> Remove this ctor since it's the same as the implicit default ctor now.
This should be written as:

  DWARFFormValue Value;

There's no need to explicitly default construct & then copy construct the object - the default constructor will be called implicitly.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64407/new/

https://reviews.llvm.org/D64407





More information about the llvm-commits mailing list