Add a testcase to ensure that ctor/dtor attributes work in C
authorChris Lattner <sabre@nondot.org>
Thu, 26 Jun 2003 14:56:36 +0000 (14:56 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 26 Jun 2003 14:56:36 +0000 (14:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6919 91177308-0d34-0410-b5e6-96231b3b80d8

test/C++Frontend/ConstructorDestructorAttributes.c [new file with mode: 0644]

diff --git a/test/C++Frontend/ConstructorDestructorAttributes.c b/test/C++Frontend/ConstructorDestructorAttributes.c
new file mode 100644 (file)
index 0000000..1a5fb9c
--- /dev/null
@@ -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; }