[Lldb-commits] [PATCH] D62702: [ABI] Fix SystemV ABI to handle nested aggregate type returned in register

Saleem Abdulrasool via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 30 16:38:51 PDT 2019


compnerd added inline comments.


================
Comment at: lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1563
 
+// The compiler will faltten the nested aggregate type into single
+// layer and push the value to stack
----------------
NIT: `faltten` -> `flatten`


================
Comment at: lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1568
+// return false if the aggregate is in memory
+static bool FlattenAggregateType(
+    ExecutionContext &exe_ctx,
----------------
I really wish that we could just use `CGFunctionInfo::getReturnInfo().getKind()`


================
Comment at: lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1678
 
-      const uint32_t num_children = return_compiler_type.GetNumFields();
+      // const uint32_t num_children = return_compiler_type.GetNumFields();
+      const uint32_t num_children = aggregate_compiler_types.size();
----------------
Hmm, dead code?


================
Comment at: lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1810
           return return_valobj_sp;
+        }
         if (copy_from_offset + field_byte_width >
----------------
The braces are extraneous


================
Comment at: lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp:1811
+        }
         if (copy_from_offset + field_byte_width >
+            copy_from_extractor->GetByteSize()) {
----------------
The braces are extraneous


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D62702





More information about the lldb-commits mailing list