http://llvm.org/bugs/show_bug.cgi?id=17918
Bug ID: 17918
Summary: COMDAT names don't match the ones use by MSVC
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
given
inline void __stdcall bar() {
}
void zed() {
bar();
}
msvc produces:
SECTION HEADER #4
.text name
COMDAT; sym= "void __stdcall bar(void)" (?bar@@YGXXZ)
clang produces:
SECTION HEADER #2
/4 name (.text$?bar@@YGXXZ)
...
COMDAT; sym= "void __stdcall bar(void)" (?bar@@YGXXZ)
so the comdat uses the same symbol, but the section name is different.
It is similar for data. Given
template<class T>
struct foo {
static int bar;
};
template<class T>
int foo<T>::bar;
int *f() {
return &foo<int>::bar;
}
msvc produces
SECTION HEADER #4
.bss name
...
COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo@H@@2HA)
clang produces
SECTION HEADER #2
/4 name (.bss$?bar@?$foo@H@@2HA)
...
COMDAT; sym= "public: static int foo<int>::bar" (?bar@?$foo@H@@2HA)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs