brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 9bbe5be Raw
86 lines · c
1/* 2This is a clang style test case for checking that preprocessor3defines match gcc.4*/5 6/*7RUN: for arch in -m32 -m64; do \8RUN:   for lang in -std=gnu89 -ansi -std=c99 -std=gnu99; do \9RUN:     for input in c objective-c; do \10RUN:       for opts in "-O0" "-O1 -dynamic" "-O2 -static" "-Os"; do     \11RUN:         echo "-- $arch, $lang, $input, $opts --"; \12RUN:         for cc in 0 1; do \13RUN:           if [ "$cc" == 0 ]; then \14RUN:             cc_prog=clang; \15RUN:             output=%t0; \16RUN:           else \17RUN:             cc_prog=gcc; \18RUN:             output=%t1; \19RUN:           fi; \20RUN:           $cc_prog $arch $lang $opts -march=core2 -dM -E -x $input %s | sort > $output; \21RUN:          done; \22RUN:          if (! diff %t0 %t1); then exit 1; fi; \23RUN:       done; \24RUN:     done; \25RUN:   done; \26RUN: done;27*/28 29/* We don't care about this difference */30#ifdef __PIC__31#if __PIC__ == 132#undef __PIC__33#undef __pic__34#define __PIC__ 235#define __pic__ 236#endif37#endif38 39/* Undefine things we don't expect to match. */40#undef __core241#undef __core2__42#undef __SSSE3__43 44/* Undefine things we don't expect to match. */45#undef __DEC_EVAL_METHOD__46#undef __INT16_TYPE__47#undef __INT32_TYPE__48#undef __INT64_TYPE__49#undef __INT8_TYPE__50#undef __SSP__51#undef __APPLE_CC__52#undef __VERSION__53#undef __clang__54#undef __llvm__55#undef __nocona56#undef __nocona__57#undef __k858#undef __k8__59#undef __tune_nocona__60#undef __tune_core2__61#undef __POINTER_WIDTH__62#undef __INTPTR_TYPE__63#undef __NO_MATH_INLINES64 65#undef __DEC128_DEN__66#undef __DEC128_EPSILON__67#undef __DEC128_MANT_DIG__68#undef __DEC128_MAX_EXP__69#undef __DEC128_MAX__70#undef __DEC128_MIN_EXP__71#undef __DEC128_MIN__72#undef __DEC32_DEN__73#undef __DEC32_EPSILON__74#undef __DEC32_MANT_DIG__75#undef __DEC32_MAX_EXP__76#undef __DEC32_MAX__77#undef __DEC32_MIN_EXP__78#undef __DEC32_MIN__79#undef __DEC64_DEN__80#undef __DEC64_EPSILON__81#undef __DEC64_MANT_DIG__82#undef __DEC64_MAX_EXP__83#undef __DEC64_MAX__84#undef __DEC64_MIN_EXP__85#undef __DEC64_MIN__86