19 lines · c
1// REQUIRES: target={{s390x-ibm-zos}}2 3// In this case we expect __TARGET_LIB__ not to be defined because we don't4// include any files here, and in particular, any from the LE.5// RUN: %clang -mzos-target=current -dM -E %s | FileCheck --check-prefix=CURRENT %s6// CURRENT-NOT: #define __TARGET_LIB__7 8// RUN: %clang -mzos-target=zosv2r5 -dM -E %s | FileCheck --check-prefix=ZOSVR %s9// ZOSVR: #define __TARGET_LIB__ 0x4205000010 11// RUN: %clang -mzos-target=0x4204001f -dM -E %s | FileCheck --check-prefix=HEX %s12// HEX: #define __TARGET_LIB__ 0x4204001F13 14// RUN: not %clang -mzos-target=0x42010000 -dM -E %s 2>&1 | FileCheck --check-prefix=ERR-DISCONTINUED %s15// ERR-DISCONTINUED: z/OS target level "0x42010000" is discontinued. Unexpected behavior might occur if an out-of-support target level is specified. Use z/OS target level "zosv2r4", or later instead16 17// RUN: not %clang -mzos-target=Rubbish -dM -E %s 2>&1 | FileCheck --check-prefix=ERR-INVALID-ARG %s18// ERR-INVALID-ARG: "Rubbish" is not recognized as a valid z/OS target level. The z/OS target level must be "current", or of the form "zosvVrR", where "V" is the version and "R" is the release, or given as a "0x"-prefixed eight digit hexadecimal value19