Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crucible-llvm: Refactor and export override pipe-fitting code #1193

Merged
merged 8 commits into from
Mar 27, 2024

Conversation

langston-barrett
Copy link
Contributor

@langston-barrett langston-barrett commented Mar 27, 2024

The code in question converts between bitvectors and pointers so that it is easy and natural to specify overrides using bitvectors, while at runtime only LLVM pointers are used. The built-in overrides (e.g., for libc) all expect to be wrapped in this casting code. They're all exported, so to make them usable by downstream clients, we also need to export the code that does the pipe-fitting.

  • Factor it into its own module
  • Make it return errors instead of panicing
  • Possibly rename it
  • Add haddocks

The goal is to clean it up a bit and export it.
Make it not panic by default, to make it usable by other clients who may
not want to panic. Also, clear up the phase boundary to handle errors
(e.g., in the case for structs).
@langston-barrett
Copy link
Contributor Author

I have tested this using a non-Crucible-LLVM frontend, and it appears to work as intended.

@langston-barrett langston-barrett marked this pull request as ready for review March 27, 2024 16:34
@langston-barrett langston-barrett merged commit 383ddb8 into GaloisInc:master Mar 27, 2024
24 checks passed
@langston-barrett langston-barrett deleted the lb/llvm-casts branch March 27, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants