[all-commits] [llvm/llvm-project] 2f8155: [DebugInfo] Fix printing of DW_LNS_set_isa

James Henderson via All-commits all-commits at lists.llvm.org
Wed Dec 11 05:39:33 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f8155023ad49ca88151d954c1a6d6069b072ca3
      https://github.com/llvm/llvm-project/commit/2f8155023ad49ca88151d954c1a6d6069b072ca3
  Author: James Henderson <jh7370 at my.bristol.ac.uk>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
    M llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp

  Log Message:
  -----------
  [DebugInfo] Fix printing of DW_LNS_set_isa

The Isa register is a uint8_t, but at least on Windows this is
internally an unsigned char, which meant that prior to this patch it got
formatted as an ASCII character, rather than a decimal number. This
patch fixes this by casting it to a uint64_t before printing. I did it
this way instead of using a uint8_t formatter because a) it is simpler,
and b) it allows us to change the internal type of Isa in the future
without this code breaking.

I also took the opportunity to test the printing of the other standard
opcodes.

Reviewed by: probinson

Differential Revision: https://reviews.llvm.org/D71274




More information about the All-commits mailing list