2021-02-12 01:00:11 +08:00
|
|
|
/// Simple tests for valid input.
|
|
|
|
/// -Wa,-implicit-it=
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
|
|
|
|
/// -Xassembler -mimplicit-it=
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
|
|
|
|
/// Test space separated -Wa,- arguments (latter wins).
|
2021-05-20 05:11:52 +08:00
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
2021-02-12 01:00:11 +08:00
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=never -Wa,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
|
|
|
|
/// Test comma separated -Wa,- arguments (latter wins).
|
2021-05-20 05:11:52 +08:00
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
2021-02-12 01:00:11 +08:00
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=never,-mimplicit-it=always %s 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=never %s 2>&1 | FileCheck %s --check-prefix=NEVER
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=arm %s 2>&1 | FileCheck %s --check-prefix=ARM
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=thumb %s 2>&1 | FileCheck %s --check-prefix=THUMB
|
|
|
|
|
2021-05-20 05:11:52 +08:00
|
|
|
/// Mix -implicit-it= (compiler) with -Wa,-mimplicit-it= (assembler), the
|
|
|
|
/// last one set takes priority.
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -mimplicit-it=always -Wa,-mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -mimplicit-it=never -Wa,-mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=never -mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS
|
2021-05-20 05:16:41 +08:00
|
|
|
|
2021-02-12 01:00:11 +08:00
|
|
|
/// Test invalid input.
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=XINVALID
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
|
|
|
|
// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID
|
|
|
|
|
|
|
|
|
2021-05-20 05:11:52 +08:00
|
|
|
/// Check that there isn't a second -arm-implicit-it before or after the one
|
|
|
|
/// that was the indended match.
|
|
|
|
// ALWAYS-NOT: "-arm-implicit-it={{.*}}"
|
2021-02-12 01:00:11 +08:00
|
|
|
// ALWAYS: "-mllvm" "-arm-implicit-it=always"
|
2021-05-20 05:11:52 +08:00
|
|
|
// ALWAYS-NOT: "-arm-implicit-it={{.*}}"
|
|
|
|
// NEVER-NOT: "-arm-implicit-it={{.*}}"
|
2021-02-12 01:00:11 +08:00
|
|
|
// NEVER: "-mllvm" "-arm-implicit-it=never"
|
2021-05-20 05:11:52 +08:00
|
|
|
// NEVER-NOT: "-arm-implicit-it={{.*}}"
|
2021-02-12 01:00:11 +08:00
|
|
|
// ARM: "-mllvm" "-arm-implicit-it=arm"
|
|
|
|
// THUMB: "-mllvm" "-arm-implicit-it=thumb"
|
|
|
|
// INVALID: error: unsupported argument '-mimplicit-it=foo' to option 'Wa,'
|
|
|
|
// XINVALID: error: unsupported argument '-mimplicit-it=foo' to option 'Xassembler'
|