Table of Contents

Compilation pipeline (llmcpp)

The compilation pipeline turns annotated source into ordinary C++ and then a program. This shortened integration-test excerpt exercises generation followed by conventional compilation:

llmcpp::test::TestWorkspace work;
llmcpp::test::TestCommandResult generate =
    work.mock("json/00_all_forms.json",
              {"--llm", "-fllm-cache-dir=cache", "00_all_forms.cpp"});
REQUIRE(generate.m_status == 0);
 
llmcpp::test::TestCommandResult build =
    work.llmcpp({"00_all_forms.llm.cpp", "-o", "from-llm-cpp"});
REQUIRE(build.m_status == 0);

The mock supplies predictable implementations for the annotated fixture. The first invocation writes rewritten source; the second consumes that file as C++.

Within generation, the frontend discovers targets, Clang supplies context, the cache is checked, and an agent implements missing bodies. Acceptance and source rewriting precede normal compilation. Errors can stop any stage, so a generation failure and a C++ compilation failure need different investigation.

Source: test_integration_generation.cpp.