[all-commits] [llvm/llvm-project] e130ee: OpaquePtr: print byval types containing anonymous ...

Tim Northover via All-commits all-commits at lists.llvm.org
Tue Jan 7 07:11:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e130eef58814d12b0490033fbedcf75db8a4f148
      https://github.com/llvm/llvm-project/commit/e130eef58814d12b0490033fbedcf75db8a4f148
  Author: Tim Northover <t.p.northover at gmail.com>
  Date:   2020-01-07 (Tue, 07 Jan 2020)

  Changed paths:
    M llvm/lib/IR/AsmWriter.cpp
    M llvm/test/Assembler/byval-type-attr.ll

  Log Message:
  -----------
  OpaquePtr: print byval types containing anonymous types correctly.

Attribute::getAsString doesn't have enough information to print anonymous
Module-level types correctly, so they come back as "%type 0xabcd". This results
in broken IR when printing as text.

Instead, print type-attributes (currently just byval) using the TypePrinting
infrastructure available in AsmWriter. This only applies to function argument
attributes.




More information about the All-commits mailing list