diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-02-15 18:11:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-02-15 18:11:42 +0000 |
commit | e061015de8915ba7a61784b930eb1cc374f15060 (patch) | |
tree | ebb8f6d4c2ae70cd004b41af9eb4a1fb1a749567 /clang/test/CodeGenCXX/attr-used.cpp | |
parent | 5e38f35fe38bba2281eb5730df3a7e4c0248cf94 (diff) | |
download | bcm5719-llvm-e061015de8915ba7a61784b930eb1cc374f15060.tar.gz bcm5719-llvm-e061015de8915ba7a61784b930eb1cc374f15060.zip |
Emit in-class member function definitions that are marked
"used". Fixes <rdar://problem/8684363>.
llvm-svn: 125579
Diffstat (limited to 'clang/test/CodeGenCXX/attr-used.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/attr-used.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/attr-used.cpp b/clang/test/CodeGenCXX/attr-used.cpp new file mode 100644 index 00000000000..26109e7c630 --- /dev/null +++ b/clang/test/CodeGenCXX/attr-used.cpp @@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s + +// <rdar://problem/8684363>: clang++ not respecting __attribute__((used)) on destructors +struct X0 { + // CHECK: define linkonce_odr void @_ZN2X0C1Ev + __attribute__((used)) X0() {} + // CHECK: define linkonce_odr void @_ZN2X0D1Ev + __attribute__((used)) ~X0() {} +}; |