Files
AILang/crates/ail/tests/snapshots/hello.ll
T
Brummel a20ab93c66 Iter 5c: Cross-Module-Codegen
Symbol-Mangling-Schema einheitlich auf @ail_<modul>_<def> umgestellt
(auch für Single-Modul-Programme), String-Globals als
@.str_<modul>_<idx>. main bleibt LLVM-/C-ABI-Eintrittspunkt und ist
ein Trampoline auf @ail_<entry>_main. lower_workspace emittiert eine
einzige .ll für den ganzen Workspace, alphabetisch nach Modulname,
Cross-Module-Calls über Import-Map aufgelöst. ail build / ail emit-ir
laufen jetzt durch den Workspace-Pfad. IR-Snapshots regeneriert,
neuer ws_main-Snapshot. E2E-Test workspace_build_runs_imported_fn
prüft, dass das Binary die importierte Funktion korrekt aufruft.
Schuld #19 (source_filename) durch einheitliches <entry>.ail-Schema
geschlossen.
2026-05-07 11:39:59 +02:00

22 lines
430 B
LLVM

; AILang generated workspace; entry: hello
source_filename = "hello.ail"
target triple = "<NORMALIZED>"
@.str_hello_str_0 = private unnamed_addr constant [15 x i8] c"Hallo, AILang.\00", align 1
declare i32 @printf(ptr, ...)
declare i32 @puts(ptr)
declare ptr @malloc(i64)
define i8 @ail_hello_main() {
entry:
call i32 @puts(ptr @.str_hello_str_0)
ret i8 0
}
define i32 @main() {
call i8 @ail_hello_main()
ret i32 0
}