<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 --- - Codegen creates two distinct types for same Clang type"
   href="http://llvm.org/bugs/show_bug.cgi?id=15341">15341</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Codegen creates two distinct types for same Clang type
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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 Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>wolfeinstein@gmail.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>When using CodeGenModule class to code generate a module, GetAddrOfGlobal is
used to ensure that a global variable is actually saved and created in the
module. Then the module is released and linked into a second module.

Given

VarDecl* vd = ...

which is a global variable, then

codegen.getTypes().ConvertType(vd->getType());

is not the same LLVM type as

module.getGlobalVariable(codegen.MangleName(vd));

after indirection has been accounted for. Clang creates identical named and
unnamed LLVM type. This is after CodeGenModule::Release() has been called. The
test I have been working with is simply std::cout in <iostream>. This causes
spurious LLVM type errors. I am using Windows 7 x64, VS 2012, targetting MinGW
and using libstdc++ 4.6.3, and Clang is r175973.</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>