[Lldb-commits] [PATCH] D52689: [LLDB] - Add support for DW_FORM_implicit_const.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 11 07:18:13 PDT 2018


clayborg added a comment.

Down to just modifying the DWARFFormValue constructor to be able to take a CU only. Looks good.



================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:241-242
+        for (uint32_t i = 0; i < numAttributes; ++i) {
+          DWARFFormValue form_value;
+          form_value.SetCompileUnit(cu);
+
----------------
Make either a constructor that takes just a CU or provide a default value for the dw_form_t form? Then this code will be:

```
DWARFFormValue form_value(cu);
```


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:429-430
+    for (uint32_t i = 0; i < numAttributes; ++i) {
+      DWARFFormValue form_value;
+      form_value.SetCompileUnit(cu);
+
----------------
Make either a constructor that takes just a CU or provide a default value for the dw_form_t form? Then this code will be:

```
DWARFFormValue form_value(cu);
```


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:625-626
+        for (uint32_t i = 0; i < numAttributes; ++i) {
+          DWARFFormValue form_value;
+          form_value.SetCompileUnit(cu);
+          dw_attr_t attr;
----------------
Make either a constructor that takes just a CU or provide a default value for the dw_form_t form? Then this code will be:

```
DWARFFormValue form_value(cu);
```


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:803-804
+    for (uint32_t i = 0; i < num_attributes; ++i) {
+      DWARFFormValue form_value;
+      form_value.SetCompileUnit(cu);
+
----------------
Make either a constructor that takes just a CU or provide a default value for the dw_form_t form? Then this code will be:

```
DWARFFormValue form_value(cu);
```


https://reviews.llvm.org/D52689





More information about the lldb-commits mailing list