https://bugs.llvm.org/show_bug.cgi?id=38868
Bug ID: 38868
Summary: for Microsoft compatibility, md5 hash on long mangled
names
Product: clang
Version: 6.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: mib.bugzi...@gmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
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();
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs