UNDER THE HOOD
weavec::Frontend — Clang and LLVM integration
| Component | Role |
|---|---|
GuardPass (GuardPass.h; GuardPass.cpp, GuardPassImpl.h, GuardInsert.cpp, GuardLibrary.cpp, GuardLoops.cpp, GuardExpand.cpp, GuardFrames.cpp, GuardGlobals.cpp) |
The four passes of Compile pipeline and registerGuardPasses, which adds them through CodeGenOptions::PassBuilderCallbacks with the mode (trap, report, verify), the unit’s unsafe regions and its enforcement ledger. |
EnforcementLedger |
The rows the passes record, their rollup, the weavec-ledger version 3 JSON writer and the summary line. |
UnsafeRegions |
The WEAVEC_UNSAFE and no_sanitize ranges of a unit, by file, the AST consumer that collects them, and UnsafeAnnotation. |
Driver |
weavec-cc: DriverOptions (WeaveC’s flags, split from Clang’s), the in-process -cc1 jobs with the enforcement set-up (configureEnforcement), ASan’s contract and fortification, the wrapper action that adds the unsafe-region collector, the runtime’s link line (addRuntimeLibraries, runtimeObstacle, allocatorDefinedBy, dropAllocatorIfDefined), and --help-weavec. |
ResourceDir |
Locates weavec.h, the runtime archives, Clang’s resource directory and clang. |