diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-04 18:38:59 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-04 18:38:59 +0000 |
commit | 3f643bd1248b77f5e87af2f7ee5e4f0881729e93 (patch) | |
tree | fdbd27dae71ba4270064ab2520256ec33c185150 /clang/test/CodeGenCXX/destructors.cpp | |
parent | a6775b622f45ff0693133e2fdc685eea6a147abe (diff) | |
download | bcm5719-llvm-3f643bd1248b77f5e87af2f7ee5e4f0881729e93.tar.gz bcm5719-llvm-3f643bd1248b77f5e87af2f7ee5e4f0881729e93.zip |
Use aliases for more constructors and destructors.
With this patch we produce alias for cases like
template<typename T>
struct foobar {
foobar() {
}
};
template struct foobar<void>;
We just have to be careful to produce the same aliases in every TU because
of comdats.
llvm-svn: 194000
Diffstat (limited to 'clang/test/CodeGenCXX/destructors.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/destructors.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/clang/test/CodeGenCXX/destructors.cpp b/clang/test/CodeGenCXX/destructors.cpp index de73fcce3a4..0030aae92ed 100644 --- a/clang/test/CodeGenCXX/destructors.cpp +++ b/clang/test/CodeGenCXX/destructors.cpp @@ -9,6 +9,7 @@ // CHECK-DAG: @_ZN5test312_GLOBAL__N_11DD1Ev = alias internal {{.*}} @_ZN5test312_GLOBAL__N_11DD2Ev // CHECK-DAG: @_ZN5test312_GLOBAL__N_11DD2Ev = alias internal bitcast {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev // CHECK-DAG: @_ZN5test312_GLOBAL__N_11CD1Ev = alias internal {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev +// CHECK-DAG: @_ZN6PR752617allocator_derivedD1Ev = alias weak_odr void (%"struct.PR7526::allocator_derived"*)* @_ZN6PR752617allocator_derivedD2Ev struct A { int a; @@ -44,9 +45,6 @@ namespace PR7526 { // CHECK: call void @__cxa_call_unexpected allocator::~allocator() throw() { foo(); } - // CHECK-LABEL: define linkonce_odr void @_ZN6PR752617allocator_derivedD1Ev(%"struct.PR7526::allocator_derived"* %this) unnamed_addr - // CHECK-NOT: call void @__cxa_call_unexpected - // CHECK: } void foo() { allocator_derived ad; } @@ -396,6 +394,11 @@ namespace test9 { // CHECK: call void @_ZN5test31AD2Ev( // CHECK: ret void + // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev( + // CHECK: getelementptr inbounds i8* {{.*}}, i64 -8 + // CHECK: call void @_ZN5test312_GLOBAL__N_11CD1Ev( + // CHECK: ret void + // CHECK: declare void @_ZN5test31BD2Ev( // CHECK: declare void @_ZN5test31AD2Ev( @@ -408,11 +411,6 @@ namespace test9 { // CHECK: call void @_ZdlPv({{.*}}) [[NUW]] // CHECK: resume { i8*, i32 } - // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev( - // CHECK: getelementptr inbounds i8* {{.*}}, i64 -8 - // CHECK: call void @_ZN5test312_GLOBAL__N_11CD1Ev( - // CHECK: ret void - // CHECK-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD0Ev( // CHECK: getelementptr inbounds i8* {{.*}}, i64 -8 // CHECK: call void @_ZN5test312_GLOBAL__N_11CD0Ev( |