1; RUN: llc < %s -mtriple=x86_64-darwin -remarks-section -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN -DPATH=%/t.yaml %s
2; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=yaml-strtab -remarks-section -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-STRTAB -DPATH=%/t.yaml %s
3
4; RUN: llc < %s -mtriple=x86_64-darwin -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-DEFAULT %s
5; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=yaml-strtab -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-DEFAULT-YAML-STRTAB %s
6; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=bitstream -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-DEFAULT-BITSTREAM %s
7; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=bitstream -remarks-section=false -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-OVERRIDE-BITSTREAM %s
8; RUN: llc < %s -mtriple=x86_64-darwin --pass-remarks-format=yaml -remarks-section=true -pass-remarks-output=%/t.yaml | FileCheck --check-prefix=CHECK-DARWIN-OVERRIDE-YAML %s
9
10; CHECK-DARWIN: .section __LLVM,__remarks,regular,debug
11; CHECK-DARWIN-NEXT: .byte
12
13; CHECK-DARWIN-STRTAB: .section __LLVM,__remarks,regular,debug
14; CHECK-DARWIN-STRTAB-NEXT: .byte
15
16; By default, the format is YAML which does not need a section.
17; CHECK-DARWIN-DEFAULT-NOT: .section __LLVM,__remarks
18
19; yaml-strtab needs a section.
20; CHECK-DARWIN-DEFAULT-YAML-STRTAB: .section __LLVM,__remarks
21
22; bitstream needs a section.
23; CHECK-DARWIN-DEFAULT-BITSTREAM: .section __LLVM,__remarks
24
25; -remarks-section should force disable the section.
26; CHECK-DARWIN-OVERRIDE-BITSTREAM-NOT: .section __LLVM,__remarks
27
28; -remarks-section should also force enable the section.
29; CHECK-DARWIN-OVERRIDE-YAML: .section __LLVM,__remarks
30define void @func1() {
31  ret void
32}
33