diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-10 06:03:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-10 06:03:22 +0000 |
commit | 3ade97504790bbc5a148baa5b3f7e577aed9c1c6 (patch) | |
tree | 956307bbe288e4b2e173d7645d2222280f816eb1 /test/CodeGenCXX/template-anonymous-types.cpp | |
parent | 1b5ba858e4628049a7105257fa712b4ab93c0a62 (diff) |
implement a nice new optimization: CodeGenTypes::UpdateCompletedType
is called whenever a tag type is completed. We previously used that
as the sign to layout the codegen representation for the tag type,
which worked but meant that we laid out *every* completed type, whether
it was used or not.
Now we just lay out the type if we've already seen it somehow else.
This means that we lay out types we've used but haven't seen a body
for, but we don't lay out tons of stuff that noone cares about.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134866 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/template-anonymous-types.cpp')
-rw-r--r-- | test/CodeGenCXX/template-anonymous-types.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/CodeGenCXX/template-anonymous-types.cpp b/test/CodeGenCXX/template-anonymous-types.cpp index c684fa798c..72fe090ceb 100644 --- a/test/CodeGenCXX/template-anonymous-types.cpp +++ b/test/CodeGenCXX/template-anonymous-types.cpp @@ -28,10 +28,10 @@ void test() { // reverse order. // // BAR's instantiation of X: - // CHECK: define internal i32 @"_ZN1XIN1S3$_1EE1fEv"(%struct.X.0* %this) - // CHECK: define internal void @"_ZN1XIN1S3$_1EEC2ES1_"(%struct.X.0* %this, i32 %t) unnamed_addr + // CHECK: define internal i32 @"_ZN1XIN1S3$_1EE1fEv"(%struct.X* %this) + // CHECK: define internal void @"_ZN1XIN1S3$_1EEC2ES1_"(%struct.X* %this, i32 %t) unnamed_addr // // FOO's instantiation of X: - // CHECK: define internal i32 @"_ZN1XIN1S3$_0EE1fEv"(%struct.X* %this) - // CHECK: define internal void @"_ZN1XIN1S3$_0EEC2ES1_"(%struct.X* %this, i32 %t) unnamed_addr + // CHECK: define internal i32 @"_ZN1XIN1S3$_0EE1fEv"(%struct.X.0* %this) + // CHECK: define internal void @"_ZN1XIN1S3$_0EEC2ES1_"(%struct.X.0* %this, i32 %t) unnamed_addr } |