- Add -static-define option driver can use when __STATIC__ should be defined (instead of __DYNAMIC__). - Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz. - Set __NO_INLINE__ following GCC 4.2. - Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2. - Set __EXCEPTIONS for Objective-C NonFragile ABI. - Set __STRICT_ANSI__ for standard conforming modes. - I added a clang style test case in utils for this, but its not particularly portable and I don't think it belongs in the test suite. llvm-svn: 68621
30 lines
649 B
C
30 lines
649 B
C
// RUN: clang-cc -Eonly %s -DOPT_O2 -O2 -verify &&
|
|
#ifdef OPT_O2
|
|
#ifndef __OPTIMIZE__
|
|
#error "__OPTIMIZE__ not defined"
|
|
#endif
|
|
#ifdef __OPTIMIZE_SIZE__
|
|
#error "__OPTIMIZE_SIZE__ defined"
|
|
#endif
|
|
#endif
|
|
|
|
// RUN: clang-cc -Eonly %s -DOPT_O0 -O0 -verify &&
|
|
#ifdef OPT_O0
|
|
#ifdef __OPTIMIZE__
|
|
#error "__OPTIMIZE__ defined"
|
|
#endif
|
|
#ifdef __OPTIMIZE_SIZE__
|
|
#error "__OPTIMIZE_SIZE__ defined"
|
|
#endif
|
|
#endif
|
|
|
|
// RUN: clang-cc -Eonly %s -DOPT_OS -Os -verify
|
|
#ifdef OPT_OS
|
|
#ifndef __OPTIMIZE__
|
|
#error "__OPTIMIZE__ not defined"
|
|
#endif
|
|
#ifdef __OPTIMIZE_SIZE__
|
|
#error "__OPTIMIZE_SIZE__ not defined"
|
|
#endif
|
|
#endif
|