<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 - for Microsoft compatibility, md5 hash on long mangled names"
   href="https://bugs.llvm.org/show_bug.cgi?id=38868">38868</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>for Microsoft compatibility, md5 hash on long mangled names
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mib.bugzilla@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>For long mangled names, VS2017 (and earlier) create an md5 hash for some
external names. Since clang doesn't do this, there is an undefined symbol at
link time. Here is a test case. 
In my experiment, clang created a External PROC named xxxfoo, but Microsoft
mangled it to 
test.asm:       call    ??@f37d033b2f7c2800ae7be4d047d48121@

File test.h
#include <string>
#include <map>

#define FUN4096 xxfoo
#define FUN4095 xfoo
#define FUN4097 xxxfoo

class yxxxxxxxxxxxxxxxxxxxxField {};

typedef std::map<std::string, yxxxxxxxxxxxxxxxxxxxxField>
yxxxxxxxxxxxxxxxScreen
;
typedef std::map<std::string, yxxxxxxxxxxxxxxxScreen> yxxxxxxxxxxxxxxxWebApp;
typedef std::map<std::string, yxxxxxxxxxxxxxxxWebApp> yxxxxxxxxxxxxxxxw2;
typedef std::map<std::string, yxxxxxxxxxxxxxxxw2> mymap;
//typedef std::map<std::string, WebApp2> WebAppTest;
//typedef std::map<std::string, WebAppTest> mymap;

extern void FUN4096(mymap);
extern void FUN4095(mymap);
extern void FUN4097(mymap);

File test.cpp
#include "test.h"
#include <stdio.h>

mymap obj;

int main() {
   FUN4096(obj);
   FUN4095(obj);
   FUN4097(obj);
   printf("PASSED\n");
   return 0;
}
File testa.cpp
#include "test.h"

void FUN4096( mymap obj)
{
   obj.clear();
}

void FUN4095( mymap obj)
{
   obj.clear();
}

void FUN4097( mymap obj)
{
   obj.clear();
}</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>