<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 - [codeview] Clang needs to generate unique mangled names for types in anonymous namespaces"
   href="https://bugs.llvm.org/show_bug.cgi?id=38609">38609</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[codeview] Clang needs to generate unique mangled names for types in anonymous namespaces
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </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>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>brock.wyma@intel.com, llvm-bugs@lists.llvm.org, llvm@inglorion.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In CodeView, most struct types are referred to through forward declarations
that use the mangled name of the type. If the type's mangled name is not unique
across the whole project, the debugger will find the wrong one.

This issue was discussed as part of <a href="https://reviews.llvm.org/D45438">https://reviews.llvm.org/D45438</a>, but so far
as I can tell nobody filed a bug for this.

This hasn't been a huge problem so far, but perhaps it's just because we don't
have enough debugger power users to report the issue. However, when type names
collide, debug info verification during ThinLTO now fails. I reported that as
<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fragment variable size verification fails during LTO in presence of ODR violations"
   href="show_bug.cgi?id=38608">https://bugs.llvm.org/show_bug.cgi?id=38608</a>.

In order to avoid these problems, Clang needs to hash some kind of
deterministic module identifier into the way it mangles names in anonymous
namespaces. One reasonable thing to do would be to hash the compiler
invocation, or whatever parts are conveniently hashable, such as just the path
to the main source file.</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>