
- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
30 lines
649 B
C
30 lines
649 B
C
// RUN: %clang_cc1 -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_cc1 -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_cc1 -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
|