xref: /llvm-project/llvm/test/Bitcode/stream-types.c (revision 84e80979b53036d1df4e35ae30439728c1244ba6)
1 // Tests that llvm-bcanalyzer recognizes the correct "stream type" for various
2 // common bitstream formats.
3 
4 // RUN: llvm-bcanalyzer -dump %s.ast | FileCheck %s -check-prefix=CHECK-AST
5 // CHECK-AST: Stream type: Clang Serialized AST
6 
7 // RUN: llvm-bcanalyzer -dump %s.dia | FileCheck %s -check-prefix=CHECK-DIAG
8 // CHECK-DIAG: Stream type: Clang Serialized Diagnostics
9 
10 // RUN: not llvm-bcanalyzer -dump %s.ast.incomplete 2>&1 | FileCheck %s -check-prefix=CHECK-INCOMPLETE
11 // RUN: not llvm-bcanalyzer -dump %s.dia.incomplete 2>&1 | FileCheck %s -check-prefix=CHECK-INCOMPLETE
12 // CHECK-INCOMPLETE: Bitcode stream should be a multiple of 4 bytes in length
13 
14 // RUN: llvm-bcanalyzer -dump %s.opt.bitstream | FileCheck %s -check-prefix=CHECK-REMARKS
15 // CHECK-REMARKS: Stream type: LLVM Remarks
16