summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/destructors.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 21:37:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 21:37:29 +0000
commit2e2995bf506c4f971f20235f59e0ceed45b77770 (patch)
tree35796044b19f64d3d777266f06e39546d3fef968 /clang/test/CodeGenCXX/destructors.cpp
parentf02287db274d955bf4198c6ee10b67e6ebf3985a (diff)
downloadbcm5719-llvm-2e2995bf506c4f971f20235f59e0ceed45b77770.tar.gz
bcm5719-llvm-2e2995bf506c4f971f20235f59e0ceed45b77770.zip
Produce direct calls instead of alias to linkonce_odr functions.
This is a small optimization on linux, but should help more on windows where msvc only outputs one destructor if there would be two identical ones. llvm-svn: 194095
Diffstat (limited to 'clang/test/CodeGenCXX/destructors.cpp')
-rw-r--r--clang/test/CodeGenCXX/destructors.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/destructors.cpp b/clang/test/CodeGenCXX/destructors.cpp
index 472a229a9be..887b73fcc59 100644
--- a/clang/test/CodeGenCXX/destructors.cpp
+++ b/clang/test/CodeGenCXX/destructors.cpp
@@ -9,8 +9,6 @@
// 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
-// CHECK-DAG: @_ZN6test106OptionD1Ev = alias weak_odr void (%"struct.test10::Option"*)* @_ZN6test106OptionD2Ev
struct A {
int a;
@@ -46,6 +44,9 @@ namespace PR7526 {
// CHECK: call void @__cxa_call_unexpected
allocator::~allocator() throw() { foo(); }
+ // CHECK-LABEL: define void @_ZN6PR75263fooEv()
+ // CHECK: call void @_ZN6PR752617allocator_derivedD2Ev
+
void foo() {
allocator_derived ad;
}
@@ -367,14 +368,15 @@ namespace test9 {
namespace test10 {
// We used to crash trying to replace _ZN6test106OptionD1Ev with
- // _ZN6test106OptionD2Ev twice. For now check that we don't try and produce
- // an alias instead (check at the top of the file).
+ // _ZN6test106OptionD2Ev twice.
struct Option {
virtual ~Option() {}
};
template <class DataType> class opt : public Option {};
template class opt<int>;
+ // CHECK-LABEL: define zeroext i1 @_ZN6test1016handleOccurrenceEv(
bool handleOccurrence() {
+ // CHECK: call void @_ZN6test106OptionD2Ev(
Option x;
return true;
}
OpenPOWER on IntegriCloud