1 // Check that we split debug output properly 2 // 3 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t 4 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s 5 // 6 // CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo" 7 8 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t 9 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s 10 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=split -c -### %s 2> %t 11 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s 12 13 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### %s 2> %t 14 // RUN: FileCheck -check-prefix=CHECK-ACTIONS-SINGLE-SPLIT < %t %s 15 // 16 // CHECK-ACTIONS-SINGLE-SPLIT: "-enable-split-dwarf=single" 17 // CHECK-ACTIONS-SINGLE-SPLIT: "-split-dwarf-file" "split-debug.o" 18 // CHECK-ACTIONS-SINGLE-SPLIT-NOT: "-split-dwarf-output" 19 20 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### -o %tfoo.o %s 2> %t 21 // RUN: FileCheck -check-prefix=CHECK-SINGLE-SPLIT-FILENAME < %t %s 22 // 23 // CHECK-SINGLE-SPLIT-FILENAME: "-split-dwarf-file" "{{.*}}foo.o" 24 // CHECK-SINGLE-SPLIT-FILENAME-NOT: "-split-dwarf-output" 25 26 // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t 27 // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s 28 // 29 // CHECK-NO-ACTIONS-NOT: -split-dwarf 30 31 32 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -o Bad.x -### %s 2> %t 33 // RUN: FileCheck -check-prefix=CHECK-BAD < %t %s 34 // 35 // CHECK-BAD-NOT: "Bad.dwo" 36 37 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t 38 // RUN: FileCheck -check-prefix=CHECK-OPTION < %t %s 39 // 40 // RUN: %clang -target x86_64-pc-freebsd12 -gsplit-dwarf -c -### %s 2> %t 41 // RUN: FileCheck -check-prefix=CHECK-OPTION < %t %s 42 // 43 // RUN: %clang -target amdgcn-amd-amdhsa -gsplit-dwarf -c -### %s 2> %t 44 // RUN: FileCheck -check-prefix=CHECK-OPTION < %t %s 45 // 46 // CHECK-OPTION: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo" 47 48 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -S -### %s 2> %t 49 // RUN: FileCheck -check-prefix=CHECK-ASM < %t %s 50 // 51 // CHECK-ASM-NOT: objcopy 52 53 // RUN: %clang -target x86_64-unknown-linux-gnu -no-integrated-as -gsplit-dwarf -c -### %s 2> %t 54 // RUN: FileCheck -check-prefix=CHECK-IAS < %t %s 55 // 56 // CHECK-IAS: objcopy 57 58 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -fno-split-dwarf-inlining -S -### %s 2> %t 59 // RUN: FileCheck -check-prefix=CHECK-GMLT-WITH-SPLIT < %t %s 60 // 61 // CHECK-GMLT-WITH-SPLIT: "-enable-split-dwarf" 62 // CHECK-GMLT-WITH-SPLIT: "-debug-info-kind=line-tables-only" 63 // CHECK-GMLT-WITH-SPLIT: "-split-dwarf-file" 64 // CHECK-GMLT-WITH-SPLIT: "-split-dwarf-output" 65 66 // RUN: %clang -target x86_64-unknown-linux-gnu -g -fno-split-dwarf-inlining -S -### %s 2> %t 67 // RUN: FileCheck -check-prefix=CHECK-NOINLINE-WITHOUT-SPLIT < %t %s 68 // 69 // CHECK-NOINLINE-WITHOUT-SPLIT-NOT: "-enable-split-dwarf" 70 // CHECK-NOINLINE-WITHOUT-SPLIT: "-fno-split-dwarf-inlining" 71 // CHECK-NOINLINE-WITHOUT-SPLIT: "-debug-info-kind=limited" 72 73 // RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t 74 // RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-GMLT < %t %s 75 // 76 // CHECK-SPLIT-WITH-GMLT: "-enable-split-dwarf" 77 // CHECK-SPLIT-WITH-GMLT: "-debug-info-kind=limited" 78 // CHECK-SPLIT-WITH-GMLT: "-split-dwarf-output" 79 80 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t 81 // RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-NOINL < %t %s 82 // 83 // CHECK-SPLIT-WITH-NOINL: "-enable-split-dwarf" 84 // CHECK-SPLIT-WITH-NOINL: "-debug-info-kind=limited" 85 // CHECK-SPLIT-WITH-NOINL: "-split-dwarf-output" 86 87 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -S -### %s 2> %t 88 // RUN: FileCheck -check-prefix=CHECK-GMLT-OVER-SPLIT < %t %s 89 // 90 // CHECK-GMLT-OVER-SPLIT-NOT: "-enable-split-dwarf" 91 // CHECK-GMLT-OVER-SPLIT: "-debug-info-kind=line-tables-only" 92 // CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-file" 93 // CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-output" 94 95 // RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -S -### %s 2> %t 96 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-GMLT < %t %s 97 // 98 // CHECK-SPLIT-OVER-GMLT: "-enable-split-dwarf" "-debug-info-kind=limited" 99 // CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file" 100 // CHECK-SPLIT-OVER-GMLT: "-split-dwarf-output" 101 102 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -fno-split-dwarf-inlining -S -### %s 2> %t 103 // RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s 104 // 105 // CHECK-G0-OVER-SPLIT-NOT: "-enable-split-dwarf" 106 // CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind 107 // CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file" 108 // CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-output" 109 110 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -S -### %s 2> %t 111 // RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s 112 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=split -g0 -S -### %s 2> %t 113 // RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s 114 // 115 // CHECK-G0-OVER-SPLIT-NOT: "-enable-split-dwarf" 116 // CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind 117 // CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file" 118 // CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-output" 119 120 // RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf -S -### %s 2> %t 121 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s 122 // RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf=split -S -### %s 2> %t 123 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s 124 // 125 // CHECK-SPLIT-OVER-G0: "-enable-split-dwarf" "-debug-info-kind=limited" 126 // CHECK-SPLIT-OVER-G0: "-split-dwarf-file" 127 // CHECK-SPLIT-OVER-G0: "-split-dwarf-output" 128