http://llvm.org/bugs/show_bug.cgi?id=17161
Bug ID: 17161
Summary: [-cxx-abi microsoft] Mangle declarations extern "C"
functions when nested inside of namespaces properly
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
consider:
namespace test0 {
extern "C" inline void *fun0() {
struct A;
struct B {
static void *fun() {
static int A::* g;
return (void *)&g;
}
};
return B::fun();
};
void *h() { return fun0(); }
}
should be mangled as:
?g@?3??fun@B@?1??fun0@@9@SAPEAXXZ@4PEQA@?1??3@9@HEQ4?1??3@9@
when PR17157 is fixed, we get:
?g@?3??fun@B@?1??fun0@test0@@9@SAPEAXXZ@4PEQA@?1??34@9@HEQ5?1??34@9@
Note how we mangle the "test0" into the name of the static. We should pretend
that extern "C" functions live at top-most scope in such cases.
Fun fact: This is not the case for template arguments where namespace scope
suddenly matters.
--
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