xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/attr-used.cpp (revision eda6f5931d42c77e1480347b1fc3eef2f8d33806)
1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2 
3 // <rdar://problem/8684363>: clang++ not respecting __attribute__((used)) on destructors
4 struct X0 {
5   // CHECK: define linkonce_odr {{.*}} @_ZN2X0C1Ev
6   __attribute__((used)) X0() {}
7   // CHECK: define linkonce_odr {{.*}} @_ZN2X0D1Ev
8   __attribute__((used)) ~X0() {}
9 };
10