blob: 0ecc47babfe6fb2e7f65d40a160ecab65a3696f4 [file] [log] [blame]
Daniel Dunbardd2e9ca2008-08-01 00:01:51 +00001// RUN: clang -emit-llvm -o %t %s &&
2// RUN: grep -e "global_ctors.*@A" %t &&
3// RUN: grep -e "global_dtors.*@B" %t
4
5#include <stdio.h>
6
7void A() __attribute__((constructor));
8void B() __attribute__((destructor));
9
10void A() {
11 printf("A\n");
12}
13
14void B() {
15 printf("B\n");
16}
17
18int main() {
19 return 0;
20}