Skip to content
Sword

Looking inside

Every stage of the compiler will show you its work:

Terminal window
shield program.sword --emit-tokens
shield program.sword --emit-ast
shield program.sword --emit-ir # Sword's own IR
shield program.sword --emit-llvm # what gets handed to LLVM

--emit-ir is the one worth knowing about. It prints struct layouts with real offsets, which is the quickest way to see what the field reordering did.