archivesOfToyLang/tshunhue/遞歸下降分析器/LLVM
2026-11-23 01:42:14 +08:00
..
a-精簡版.ll Initial commit 2026-11-23 01:42:14 +08:00
a-精簡版.o Initial commit 2026-11-23 01:42:14 +08:00
a-精簡版.s Initial commit 2026-11-23 01:42:14 +08:00
a.cpp Initial commit 2026-11-23 01:42:14 +08:00
a.ll Initial commit 2026-11-23 01:42:14 +08:00
a.o Initial commit 2026-11-23 01:42:14 +08:00
a.out Initial commit 2026-11-23 01:42:14 +08:00
b.out Initial commit 2026-11-23 01:42:14 +08:00
README Initial commit 2026-11-23 01:42:14 +08:00

=========
Converting LLVM IR to an executable file
=========
clang++ -S -emit-llvm a.cpp // get llvm ir
llc a.ll -filetype=obj // get .o file
g++ -o a.out a.o // converting to executable file
./a.out
echo $? // get the return value of a.out

=========
See also
=========
http://llvmlite.pydata.org/en/latest/
https://mapping-high-level-constructs-to-llvm-ir.readthedocs.io/en/latest/