diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-26 14:56:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-26 14:56:36 +0000 |
commit | 102f9015c61e9e7a84e1442705e85de19fe9b400 (patch) | |
tree | 1d2185ee5662db0b93b065342f9d623c01ddbf18 | |
parent | b12b75365a11e0a626b9826bff4e68272d808f19 (diff) |
Add a testcase to ensure that ctor/dtor attributes work in C
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6919 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/C++Frontend/ConstructorDestructorAttributes.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/C++Frontend/ConstructorDestructorAttributes.c b/test/C++Frontend/ConstructorDestructorAttributes.c new file mode 100644 index 0000000000..1a5fb9c4de --- /dev/null +++ b/test/C++Frontend/ConstructorDestructorAttributes.c @@ -0,0 +1,14 @@ +#include <stdio.h> + +void ctor() __attribute__((constructor)); + +void ctor() { + printf("Create!\n"); +} +void dtor() __attribute__((destructor)); + +void dtor() { + printf("Create!\n"); +} + +int main() { return 0; } |