[PATCH] D58534: dsymutil support for DW_OP_convert

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 26 23:07:30 PST 2019


markus added inline comments.


================
Comment at: llvm/tools/dsymutil/DwarfLinker.cpp:1100
+        memset(Buffer, dwarf::DW_OP_nop, ULEBsize);
+        Linker.reportWarning("base type ref doesn't fit.", DMO);
+      }
----------------
friss wrote:
> if you hit the error, then it looks like you're only going to emit NOPs instead of the ULEB. This is going to be badly misinterpreted by a consumer. You really want to NOP-out the whole convert expression.
If the BaseTypeRef ULEB does not fit then I believe that you want to replace it (the BaseTypeRef ULEB) with zeros as that will be interpreted as a reference to the `generic type` according to the spec. I guess that replacing the entire operation and its operands with several `DW_OP_nop` would also be an option. Doing the former seems easier though and would arguably be more accurate in my opinion.


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

https://reviews.llvm.org/D58534





More information about the llvm-commits mailing list