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