[PATCH] D66600: Add encode and decode methods to InlineInfo and document encoding format to the GSYM file format

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 10:46:13 PDT 2019


JDevlieghere added inline comments.


================
Comment at: lib/DebugInfo/GSYM/InlineInfo.cpp:63
+
+static bool decodeAll(InlineInfo &Inline, DataExtractor &Data,
+                      uint64_t &Offset, uint64_t BaseAddr) {
----------------
clayborg wrote:
> aprantl wrote:
> > This returns a bool.. what does that mean?
> returns true if a InlineInfo is successfully decoded. This is a static function that is called recursively from within this function. The while statement on line 74 uses the return value.
I think Adrian means that an llvm:Error might be a better fit. That way the error can propagate up. 


================
Comment at: lib/DebugInfo/GSYM/InlineInfo.cpp:86
+  Inline.CallLine = (uint32_t)Data.getULEB128(&Offset);
+  if (HasChildren) {
+    InlineInfo Child;
----------------
This could be an early return.


================
Comment at: lib/DebugInfo/GSYM/InlineInfo.cpp:113
+  O.writeULEB(CallLine);
+  if (HasChildren) {
+    // Child address ranges are encoded as relative to the first
----------------
This could be an early return.


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

https://reviews.llvm.org/D66600





More information about the llvm-commits mailing list