Skip to content

feat: validate declaration headers before MIR lowering - #692

Merged
sanohiro merged 1 commit into
mainfrom
feat/am-h-declarations-headers
Aug 2, 2026
Merged

feat: validate declaration headers before MIR lowering#692
sanohiro merged 1 commit into
mainfrom
feat/am-h-declarations-headers

Conversation

@sanohiro

@sanohiro sanohiro commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • validate extern, imported, stored-function, main, local-header, summary, and structural drop-set metadata before MIR publication;
  • carry normalized imported FnEffect through checked HIR and strip it into an explicit six-field MIR imported record;
  • replace the overloaded HIR origin fields with FnOrigin, preserving existing per-unit exportability and ABI behavior;
  • add fail-closed four-entrypoint owner matrices, deep-header coverage, interface effect-tag rejection, and the mir-header-validation benchmark row.

Verification

  • cargo build --workspace --locked
  • scripts/test-pr.sh
  • cargo clippy --workspace --all-targets --locked -- -D warnings
  • cargo check -p align_mir --tests --locked
  • release bench/library_boundary provenance run with the LLVM 22 toolchain

The pre-PR gate was recorded by scripts/pre-pr.sh against the final HEAD. On this macOS host,
DYLD_SHARED_REGION=private stalls test-binary startup in _dyld_start; the successful gate used
the explicit LLVM 22 paths without that variable.

@sanohiro
sanohiro marked this pull request as ready for review August 2, 2026 05:44
@sanohiro
sanohiro merged commit f7ebcb4 into main Aug 2, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant