[PATCH] D26052: Modify DWARFFormValue to remember the DWARFUnit that it was decoded with.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 16:13:01 PDT 2016


aprantl added a comment.

Can you say anything about the impact this change has on the memory footprint? Do we typically keep many DWARFFormValues around?



================
Comment at: include/llvm/DebugInfo/DWARF/DWARFFormValue.h:52
 
-  dwarf::Form Form;   // Form for this value.
+  dwarf::Form Form; // Form for this value.
   ValueType Value; // Contains all data for the form.
----------------
You can doxygen'ify this by using

`dwarf::Form Form; ///< Form for this value.`

or
```
/// Form for this value.
dwarf::Form Form;
```


================
Comment at: lib/DebugInfo/DWARF/DWARFFormValue.cpp:136
 
-bool DWARFFormValue::extractValue(DataExtractor data, uint32_t *offset_ptr,
+bool DWARFFormValue::extractValue(const DataExtractor &data, 
+                                  uint32_t *offset_ptr,
----------------
A DataExtractor is only a StringRef + 2x uint8_t. Are we saving anything by passing it by reference?


Repository:
  rL LLVM

https://reviews.llvm.org/D26052





More information about the llvm-commits mailing list