-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.
Description
When libc++ defines ~__fundamental_type_info(), Clang is supposed to emit the typeinfos for all fundamental types, which should include _Float16. But this doesn’t happen, as can be seen here: https://godbolt.org/z/EKTe8z3cf
Self-standing repro:
$ cat <<EOF | clang++ -xc++ - -c -o typeinfos.o && nm -omg typeinfos.o | c++filt | grep _Float16
namespace __cxxabiv1 {
struct __fundamental_type_info {
virtual ~__fundamental_type_info();
};
// This miraculously (compiler magic) emits the type_info's for:
// 1. all of the fundamental types
// 2. pointers to all of the fundamental types
// 3. pointers to all of the const fundamental types
__fundamental_type_info::~__fundamental_type_info()
{
}
}
EOF
Output is: nothing
Ouput should be: Something like
typeinfos.o: 0000000000000580 (__DATA,__const) external typeinfo for _Float16 const*
typeinfos.o: 0000000000000560 (__DATA,__const) external typeinfo for _Float16*
typeinfos.o: 0000000000000550 (__DATA,__const) external typeinfo for _Float16
typeinfos.o: 0000000000000927 (__TEXT,__const) external typeinfo name for _Float16 const*
typeinfos.o: 0000000000000924 (__TEXT,__const) external typeinfo name for _Float16*
typeinfos.o: 0000000000000922 (__TEXT,__const) external typeinfo name for _Float16
rdar://120819357
Metadata
Metadata
Assignees
Labels
clang:codegenIR generation bugs: mangling, exceptions, etc.IR generation bugs: mangling, exceptions, etc.