<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - LLVM assembly parser swaps getterName and setterName operands of DIObjCProperty"
   href="https://bugs.llvm.org/show_bug.cgi?id=37120">37120</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM assembly parser swaps getterName and setterName operands of DIObjCProperty
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM assembly language parser
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dpfister@mail.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dexonsmith@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20187" name="attach_20187" title="test case">attachment 20187</a> <a href="attachment.cgi?id=20187&action=edit" title="test case">[details]</a></span>
test case

Note that MetadataLoader also swaps these operands, so the bug stays hidden in
a round-trip between Assembly and Bitcode.
Steps to reproduce this bug:

$ cat test.ll
; ModuleID = 'test.ll'
source_filename = "test.ll"

!named = !{!0, !1, !2}

!0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
!1 = !DICompositeType(tag: DW_TAG_structure_type, name: "Object")
!2 = !DIObjCProperty(name: "foo", file: !0, line: 7, setter: "setFoo", getter:
"getFoo", attributes: 7, type: !1)

$ opt -S test.ll | diff test.ll -
8c8
< !2 = !DIObjCProperty(name: "foo", file: !0, line: 7, setter: "setFoo",
getter: "getFoo", attributes: 7, type: !1)
---
<span class="quote">> !2 = !DIObjCProperty(name: "foo", file: !0, line: 7, setter: "getFoo", getter: "setFoo", attributes: 7, type: !1)</span ></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>