blob: eaa1e990c04cf89dd0f20730384083052f264f17 [file] [log] [blame]
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00001// Check that we split debug output properly
2//
Eric Christopher248357f2013-02-21 22:35:01 +00003// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00004// RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
5//
Eric Christopher248357f2013-02-21 22:35:01 +00006// CHECK-ACTIONS: objcopy{{.*}}--extract-dwo{{.*}}"split-debug.dwo"
7// CHECK-ACTIONS: objcopy{{.*}}--strip-dwo{{.*}}"split-debug.o"
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00008
Eric Christopher2ba5fcb2013-02-05 07:29:57 +00009
Eric Christopherd42fb732013-02-21 22:35:05 +000010// RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t
11// RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
12//
13// CHECK-NO-ACTIONS-NOT: -split-dwarf
Eric Christopher77569ff2013-02-22 01:33:46 +000014
15
16// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -o Bad.x -### %s 2> %t
17// RUN: FileCheck -check-prefix=CHECK-BAD < %t %s
18//
19// CHECK-BAD-NOT: "Bad.dwo"
Eric Christopherd3804002013-02-22 20:12:52 +000020
21// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
22// RUN: FileCheck -check-prefix=CHECK-OPTION < %t %s
23//
24// CHECK-OPTION: "-split-dwarf-file" "split-debug.dwo"
Eric Christopher30aa6b62013-06-05 23:58:15 +000025
26// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -S -### %s 2> %t
27// RUN: FileCheck -check-prefix=CHECK-ASM < %t %s
28//
29// CHECK-ASM-NOT: objcopy
30
31// RUN: %clang -target x86_64-unknown-linux-gnu -no-integrated-as -gsplit-dwarf -c -### %s 2> %t
32// RUN: FileCheck -check-prefix=CHECK-IAS < %t %s
33//
34// CHECK-IAS: objcopy
David Blaikiece3e7a62015-07-30 21:42:22 +000035
David Blaikie3d0a0392016-08-24 23:22:36 +000036// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -fno-split-dwarf-inlining -S -### %s 2> %t
37// RUN: FileCheck -check-prefix=CHECK-GMLT-WITH-SPLIT < %t %s
38//
39// CHECK-GMLT-WITH-SPLIT: "-split-dwarf=Enable"
40// CHECK-GMLT-WITH-SPLIT: "-debug-info-kind=line-tables-only"
41// CHECK-GMLT-WITH-SPLIT: "-split-dwarf-file"
42
43// RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t
44// RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-GMLT < %t %s
45//
46// CHECK-SPLIT-WITH-GMLT: "-split-dwarf=Enable"
47// CHECK-SPLIT-WITH-GMLT: "-debug-info-kind=line-tables-only"
48// CHECK-SPLIT-WITH-GMLT: "-split-dwarf-file"
49
David Blaikie37dcf6b2016-08-31 20:54:35 +000050// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t
51// RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-NOINL < %t %s
52//
53// CHECK-SPLIT-WITH-NOINL: "-split-dwarf=Enable"
54// CHECK-SPLIT-WITH-NOINL: "-debug-info-kind=limited"
55// CHECK-SPLIT-WITH-NOINL: "-split-dwarf-file"
56
David Blaikiece3e7a62015-07-30 21:42:22 +000057// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -S -### %s 2> %t
58// RUN: FileCheck -check-prefix=CHECK-GMLT-OVER-SPLIT < %t %s
59//
David Blaikiece3e7a62015-07-30 21:42:22 +000060// CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf=Enable"
David Blaikie3d0a0392016-08-24 23:22:36 +000061// CHECK-GMLT-OVER-SPLIT: "-debug-info-kind=line-tables-only"
David Blaikiece3e7a62015-07-30 21:42:22 +000062// CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-file"
63
64// RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -S -### %s 2> %t
65// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-GMLT < %t %s
66//
Douglas Katzman3459ce22015-10-08 04:24:12 +000067// CHECK-SPLIT-OVER-GMLT: "-split-dwarf=Enable" "-debug-info-kind=limited"
David Blaikiece3e7a62015-07-30 21:42:22 +000068// CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file"
Paul Robinson0334a042015-12-19 19:41:48 +000069
David Blaikie3d0a0392016-08-24 23:22:36 +000070// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -fno-split-dwarf-inlining -S -### %s 2> %t
71// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
72//
73// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf=Enable"
74// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
75// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
76
Paul Robinson0334a042015-12-19 19:41:48 +000077// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -S -### %s 2> %t
78// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
79//
Paul Robinson0334a042015-12-19 19:41:48 +000080// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf=Enable"
David Blaikie3d0a0392016-08-24 23:22:36 +000081// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
Paul Robinson0334a042015-12-19 19:41:48 +000082// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
83
84// RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf -S -### %s 2> %t
85// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s
86//
87// CHECK-SPLIT-OVER-G0: "-split-dwarf=Enable" "-debug-info-kind=limited"
88// CHECK-SPLIT-OVER-G0: "-split-dwarf-file"