blob: 2c82184081b9125f79ba842f5ee5ac758ed52f1a [file] [log] [blame]
Douglas Gregorf552c202011-02-15 18:11:42 +00001// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2
3// <rdar://problem/8684363>: clang++ not respecting __attribute__((used)) on destructors
4struct X0 {
Eli Friedman41f1fd42011-06-13 22:51:21 +00005 // CHECK: define linkonce_odr {{.*}} @_ZN2X0C1Ev
Douglas Gregorf552c202011-02-15 18:11:42 +00006 __attribute__((used)) X0() {}
Eli Friedman41f1fd42011-06-13 22:51:21 +00007 // CHECK: define linkonce_odr {{.*}} @_ZN2X0D1Ev
Douglas Gregorf552c202011-02-15 18:11:42 +00008 __attribute__((used)) ~X0() {}
9};