The LLVM Bitcode File Format documentation states that all bitstreams
begin with the magic number 'BC', and that generic bitstream analyzer
tools may check for this number in order to determine whether the
stream is a bitstream.
However, in practice:
- Only LLVM IR bitcode begins with 'BC'. Other bitstreams -- Clang AST files and precompiled headers, Clang serialized diagnostics, Swift modules -- do not start with 'BC'. A tool that actually checked for 'BC' would only be able to recognize LLVM IR.
- The llvm-bcanalyzer, arguably the most used generic bitstream analyzer tool, does not check for a magic number 'BC' (except to determine whether the file is LLVM IR).
Update the bitcode format documentation to make it clear that not all
bitstreams begin with 'BC', and that tools should not rely on that
particular magic number value.
Test Plan:
Build the docs-llvm-html target and confirm the changes render in
a Safari web browser.