2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -Eonly %s -DOPT_O2 -O2 -verify
|
2009-04-07 01:37:10 +08:00
|
|
|
#ifdef OPT_O2
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-04-07 01:37:10 +08:00
|
|
|
#ifndef __OPTIMIZE__
|
|
|
|
#error "__OPTIMIZE__ not defined"
|
|
|
|
#endif
|
2009-04-08 02:21:53 +08:00
|
|
|
#ifdef __OPTIMIZE_SIZE__
|
2009-04-07 01:37:10 +08:00
|
|
|
#error "__OPTIMIZE_SIZE__ defined"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2013-09-04 12:12:25 +08:00
|
|
|
// RUN: %clang_cc1 -Eonly %s -DOPT_O0 -verify
|
2009-04-07 01:37:10 +08:00
|
|
|
#ifdef OPT_O0
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-04-07 01:37:10 +08:00
|
|
|
#ifdef __OPTIMIZE__
|
|
|
|
#error "__OPTIMIZE__ defined"
|
|
|
|
#endif
|
2009-04-08 02:21:53 +08:00
|
|
|
#ifdef __OPTIMIZE_SIZE__
|
2009-04-07 01:37:10 +08:00
|
|
|
#error "__OPTIMIZE_SIZE__ defined"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 -Eonly %s -DOPT_OS -Os -verify
|
2009-04-07 01:37:10 +08:00
|
|
|
#ifdef OPT_OS
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
2009-04-07 01:37:10 +08:00
|
|
|
#ifndef __OPTIMIZE__
|
|
|
|
#error "__OPTIMIZE__ not defined"
|
|
|
|
#endif
|
2011-11-26 14:21:20 +08:00
|
|
|
#ifndef __OPTIMIZE_SIZE__
|
2009-04-07 01:37:10 +08:00
|
|
|
#error "__OPTIMIZE_SIZE__ not defined"
|
|
|
|
#endif
|
|
|
|
#endif
|