1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! `.ll` (LLVM IR) lexer and parser.
//!
//! The crate's module layout mirrors the LLVM 22.1.4 `AsmParser` source tree
//! (`include/llvm/AsmParser/*.h` + `lib/AsmParser/*.cpp`). One Rust file per
//! C++ translation unit; header-only C++ files map to a Rust file of the
//! same stem.
//!
//! | Rust module | LLVM source | Status |
//! |------------------------------|----------------------------------------|----------|
//! | [`ll_lexer`] | `LLLexer.h` + `LLLexer.cpp` | done |
//! | [`ll_token`] | `LLToken.h` | done |
//! | [`file_loc`] | `FileLoc.h` | done |
//! | [`numbered_values`] | `NumberedValues.h` | done |
//! | [`slot_mapping`] | `SlotMapping.h` | done |
//! | [`asm_parser_context`] | `AsmParserContext.h` + `.cpp` | done |
//! | [`parse_error`] | `LLParser.{h,cpp}` diagnostic surface | seeded |
//! | [`ll_parser`] | `LLParser.h` + `LLParser.cpp` (subset) | seeded |
//! | [`parser`] | `Parser.h` + `Parser.cpp` | seeded |
//!
//! The substrate listed as `done` is the support layer the parser-first
//! roadmap pulls in alongside `LLParser`; it ships before the parser core
//! so Sessions 2-3 can wire their resolution / location pipelines against
//! a stable interface (Roadmap section 10.5 forward-reference typestate).
use ;
/// Drain `r` into a fresh `Vec<u8>`. Convenience helper for the common case
/// where a caller has any `Read` source and wants to feed it to
/// [`ll_lexer::Lexer::new`].
///
/// The lexer itself takes a borrowed slice — no I/O traits in its signature
/// — so this is the recommended boundary between `Read` sources and the
/// lexer.