diff options
Diffstat (limited to 'test/Preprocessor/pic.c')
-rw-r--r-- | test/Preprocessor/pic.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Preprocessor/pic.c b/test/Preprocessor/pic.c new file mode 100644 index 0000000..1cddaa1 --- /dev/null +++ b/test/Preprocessor/pic.c @@ -0,0 +1,10 @@ +// RUN: clang -ccc-host-triple i386-unknown-unknown -static -dM -E -o %t %s && +// RUN: grep '#define __PIC__' %t | count 0 && +// RUN: grep '#define __pic__' %t | count 0 && +// RUN: clang -ccc-host-triple i386-unknown-unknown -fpic -dM -E -o %t %s && +// RUN: grep '#define __PIC__ 1' %t | count 1 && +// RUN: grep '#define __pic__ 1' %t | count 1 && +// RUN: clang -ccc-host-triple i386-unknown-unknown -fPIC -dM -E -o %t %s && +// RUN: grep '#define __PIC__ 2' %t | count 1 && +// RUN: grep '#define __pic__ 2' %t | count 1 && +// RUN: true |