annotate clang/test/Driver/debug-default-version.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=4 -gdwarf-2 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF2
anatofuz
parents:
diff changeset
2 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-3 -fdebug-default-version=4 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF3
anatofuz
parents:
diff changeset
3 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-4 -fdebug-default-version=2 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF4
anatofuz
parents:
diff changeset
4 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-5 -S -fdebug-default-version=2 -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
anatofuz
parents:
diff changeset
5 // RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=5 -g -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
anatofuz
parents:
diff changeset
6 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf -fdebug-default-version=2 -S -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF2
anatofuz
parents:
diff changeset
7 // RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=4 -S -o - %s 2>&1 | FileCheck %s --check-prefixes=NODEBUGINFO,NODWARF4
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 // Check which debug info formats we use on Windows. By default, in an MSVC
anatofuz
parents:
diff changeset
10 // environment, we should use codeview. You can enable dwarf, which implicitly
anatofuz
parents:
diff changeset
11 // disables codeview, or you can explicitly ask for both if you don't know how
anatofuz
parents:
diff changeset
12 // the app will be debugged.
anatofuz
parents:
diff changeset
13 // RUN: %clang -### -Werror -target i686-pc-windows-msvc -fdebug-default-version=2 -gdwarf -S -o - %s 2>&1 \
anatofuz
parents:
diff changeset
14 // RUN: | FileCheck %s --check-prefixes=DWARF2,NOCODEVIEW
anatofuz
parents:
diff changeset
15 // Explicitly request both.
anatofuz
parents:
diff changeset
16 // RUN: %clang -### -Werror -target i686-pc-windows-msvc -fdebug-default-version=4 -gdwarf -gcodeview -S -o - %s 2>&1 \
anatofuz
parents:
diff changeset
17 // RUN: | FileCheck %s --check-prefixes=DWARF4,CODEVIEW
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 // Do Assembler testing most of the same test cases as those above.
anatofuz
parents:
diff changeset
20
anatofuz
parents:
diff changeset
21 // RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=5 -g -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
anatofuz
parents:
diff changeset
22
anatofuz
parents:
diff changeset
23 // RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=4 -gdwarf-2 -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF2
anatofuz
parents:
diff changeset
24 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-3 -fdebug-default-version=4 -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF3
anatofuz
parents:
diff changeset
25 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-4 -fdebug-default-version=2 -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF4
anatofuz
parents:
diff changeset
26 // RUN: %clang -### -Werror -target x86_64-linux-gnu -gdwarf-5 -x assembler -c -fdebug-default-version=2 -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
anatofuz
parents:
diff changeset
27 // RUN: %clang -### -Werror -target x86_64-linux-gnu -fdebug-default-version=5 -g -x assembler -c -o - %s 2>&1 | FileCheck %s --check-prefix=DWARF5
anatofuz
parents:
diff changeset
28
anatofuz
parents:
diff changeset
29 int main(void) {
anatofuz
parents:
diff changeset
30 return 0;
anatofuz
parents:
diff changeset
31 }
anatofuz
parents:
diff changeset
32
anatofuz
parents:
diff changeset
33 // NOCODEVIEW-NOT: -gcodeview
anatofuz
parents:
diff changeset
34 // CODEVIEW: "-gcodeview"
anatofuz
parents:
diff changeset
35
anatofuz
parents:
diff changeset
36 // NODEBUGINFO-NOT: -debug-info-kind=
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 // DWARF2: "-dwarf-version=2"
anatofuz
parents:
diff changeset
39 // DWARF3: "-dwarf-version=3"
anatofuz
parents:
diff changeset
40 // DWARF4: "-dwarf-version=4"
anatofuz
parents:
diff changeset
41 // DWARF5: "-dwarf-version=5"
anatofuz
parents:
diff changeset
42
anatofuz
parents:
diff changeset
43 // NOCODEVIEW-NOT: -gcodeview
anatofuz
parents:
diff changeset
44 // NODWARF4-NOT: -dwarf-version=4