Skip to content

Commit 6eb76fb

Browse files
committed
[cc] type interning
1 parent dc8b893 commit 6eb76fb

File tree

14 files changed

+2727
-2043
lines changed

14 files changed

+2727
-2043
lines changed

cc/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ Supported:
9494
- Bitfields (named, unnamed, zero-width for alignment)
9595

9696
Not yet implemented:
97+
- goto, longjmp, setjmp
9798
- `inline` and inlining support
9899
- -fverbose-asm
99100
- Complex initializers
@@ -130,4 +131,8 @@ Please run `cargo fmt` before committing code, and `cargo clippy` regularly whil
130131
cargo fmt && cargo clippy -p posixutils-cc
131132
```
132133

134+
DO NOT `allow(dead_code)` to fix warnings. Instead, remove dead code; do
135+
not leave it around as a maintenance burden (and LLM token
136+
tax).
137+
133138
Read CONTRIBUTING.md in the root of the repository for more details.

cc/arch/aarch64/codegen.rs

Lines changed: 66 additions & 66 deletions
Large diffs are not rendered by default.

cc/arch/codegen.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
use crate::ir::Module;
1313
use crate::target::Target;
14+
use crate::types::TypeTable;
1415

1516
/// pcc version string for assembly header
1617
pub const PCC_VERSION: &str = env!("CARGO_PKG_VERSION");
@@ -49,7 +50,7 @@ pub fn generate_header_comments(target: &Target) -> Vec<String> {
4950
/// Trait for architecture-specific code generators
5051
pub trait CodeGenerator {
5152
/// Generate assembly code for the given IR module
52-
fn generate(&mut self, module: &Module) -> String;
53+
fn generate(&mut self, module: &Module, types: &TypeTable) -> String;
5354

5455
/// Set whether to emit basic unwind tables (cfi_startproc/cfi_endproc)
5556
fn set_emit_unwind_tables(&mut self, emit: bool);

0 commit comments

Comments
 (0)