• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: %clang -### -c -integrated-as %s \
2// RUN: -Wa,-defsym,abc=5 -Wa,-defsym,xyz=0xa \
3// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM1
4
5// RUN: %clang -### -c -no-integrated-as -target x86_64-unknown-unknown %s \
6// RUN: -Wa,-defsym,abc=5 -Wa,-defsym,xyz=0xa \
7// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM1
8
9// CHECK-DEFSYM1: "-defsym"
10// CHECK-DEFSYM1: "abc=5"
11// CHECK-DEFSYM1: "-defsym"
12// CHECK-DEFSYM1: "xyz=0xa"
13
14// RUN: not %clang -c -integrated-as -o /dev/null %s \
15// RUN: -Wa,-defsym,abc= \
16// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM-ERR1
17// CHECK-DEFSYM-ERR1: error: defsym must be of the form: sym=value: abc=
18
19// RUN: not %clang -c -integrated-as -o /dev/null %s \
20// RUN: -Wa,-defsym,=123 \
21// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM-ERR2
22// CHECK-DEFSYM-ERR2: error: defsym must be of the form: sym=value: =123
23
24// RUN: not %clang -c -integrated-as -o /dev/null %s \
25// RUN: -Wa,-defsym,abc=1a2b3c \
26// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM-ERR3
27// CHECK-DEFSYM-ERR3: error: Value is not an integer: 1a2b3c
28
29// RUN: not %clang -c -integrated-as -o /dev/null %s \
30// RUN: -Wa,-defsym \
31// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM-ERR4
32
33// RUN: not %clang -c -integrated-as -o /dev/null %s \
34// RUN: -Wa,-defsym, \
35// RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-DEFSYM-ERR4
36
37// CHECK-DEFSYM-ERR4: error: defsym must be of the form: sym=value: -defsym
38