diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-08 15:52:03 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-08 15:52:03 +0000 |
commit | eadd3cace900d65c30e0ae4e08ab52ff10a6fda5 (patch) | |
tree | 69182eb2729750bd59428eff1e210487a808cb5c /clang/test/CodeGenCXX/rtti-fundamental.cpp | |
parent | 2abed283e57fd5487c9b1549c3ea3ff459d24668 (diff) | |
download | bcm5719-llvm-eadd3cace900d65c30e0ae4e08ab52ff10a6fda5.tar.gz bcm5719-llvm-eadd3cace900d65c30e0ae4e08ab52ff10a6fda5.zip |
Eliminate excessive PCH deserialization caused by the search for
__cxxabiv1::__fundamental_type_info in every translation
unit. Previously, we would perform name lookup for
__cxxabiv1::__fundamental_type_info at the end of IRGen for a each
translation unit, to determine whether it was present. If so, we we
produce type information for all of the fundamental types. However,
this name lookup causes PCH deserialization of a significant part of the
translation unit, which has a woeful impact on performance.
With this change, we now look at each record type after we've
generated its vtable to see if it is
__cxxabiv1::__fundamental_type_info. If so, we generate type info for
all of the fundamental types. This works because
__cxxabiv1::__fundamental_type_info should always have a key function
(typically the virtual destructor), that will be defined once in the
support library. The fundamental type information will end up there.
Fixes <rdar://problem/7840011>.
llvm-svn: 100772
Diffstat (limited to 'clang/test/CodeGenCXX/rtti-fundamental.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/rtti-fundamental.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/rtti-fundamental.cpp b/clang/test/CodeGenCXX/rtti-fundamental.cpp index 473f48db67a..6826321cd5e 100644 --- a/clang/test/CodeGenCXX/rtti-fundamental.cpp +++ b/clang/test/CodeGenCXX/rtti-fundamental.cpp @@ -8,8 +8,10 @@ std::type_info foo() { namespace __cxxabiv1 { struct __fundamental_type_info { - virtual ~__fundamental_type_info() {} + virtual ~__fundamental_type_info(); }; + + __fundamental_type_info::~__fundamental_type_info() { } } // CHECK: @_ZTIv = weak_odr constant |