Home | History | Annotate | Download | only in Preprocessor
      1 // RUN: %clang_cc1 -Eonly %s -DOPT_O2 -O2 -verify
      2 #ifdef OPT_O2
      3   // expected-no-diagnostics
      4   #ifndef __OPTIMIZE__
      5     #error "__OPTIMIZE__ not defined"
      6   #endif
      7   #ifdef __OPTIMIZE_SIZE__
      8     #error "__OPTIMIZE_SIZE__ defined"
      9   #endif
     10 #endif
     11 
     12 // RUN: %clang_cc1 -Eonly %s -DOPT_O0 -verify
     13 #ifdef OPT_O0
     14   // expected-no-diagnostics
     15   #ifdef __OPTIMIZE__
     16     #error "__OPTIMIZE__ defined"
     17   #endif
     18   #ifdef __OPTIMIZE_SIZE__
     19     #error "__OPTIMIZE_SIZE__ defined"
     20   #endif
     21 #endif
     22 
     23 // RUN: %clang_cc1 -Eonly %s -DOPT_OS -Os -verify
     24 #ifdef OPT_OS
     25   // expected-no-diagnostics
     26   #ifndef __OPTIMIZE__
     27     #error "__OPTIMIZE__ not defined"
     28   #endif
     29   #ifndef __OPTIMIZE_SIZE__
     30     #error "__OPTIMIZE_SIZE__ not defined"
     31   #endif
     32 #endif
     33