summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/attr-used.cpp
blob: 0852511ea5eb24d3873205e7848adbd64de4dbf4 (plain)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -emit-llvm -cxx-abi itanium -o - %s | FileCheck %s

// <rdar://problem/8684363>: clang++ not respecting __attribute__((used)) on destructors
struct X0 {
  // CHECK: define linkonce_odr {{.*}} @_ZN2X0C1Ev
  __attribute__((used)) X0() {}
  // CHECK: define linkonce_odr {{.*}} @_ZN2X0D1Ev
  __attribute__((used)) ~X0() {}
};
OpenPOWER on IntegriCloud