<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - LinkModules with PreserveSource doesn't retain type names"
   href="http://llvm.org/bugs/show_bug.cgi?id=20068">20068</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LinkModules with PreserveSource doesn't retain type names
          </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>Linker
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kmillar@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=12674" name="attach_12674" title="Code to reproduce the bug.">attachment 12674</a> <a href="attachment.cgi?id=12674&action=edit" title="Code to reproduce the bug.">[details]</a></span>
Code to reproduce the bug.

In the attached example, calling:
   Linker::LinkModules(dest, src, Linker::PreserveSource, 0);
removes the type names from the src module, making them anonymous and
preventing src from being used to link to other modules.


src module before linking:
%mytype = type { i8 }

define %mytype @baz(%mytype %bar) {
  ret %mytype %bar
}


src module after linking:
%0 = type { i8 }

define %0 @baz(%0 %bar) {
  ret %0 %bar
}



$ llvm-config --version
3.4</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>