archivesOfToyLang/tshunhue/遞歸下降分析器/LLVM
2023-09-30 22:30:08 +08:00
..
a-精簡版.ll add some language drafts 2023-09-30 22:30:08 +08:00
a-精簡版.o add some language drafts 2023-09-30 22:30:08 +08:00
a-精簡版.s add some language drafts 2023-09-30 22:30:08 +08:00
a.cpp add some language drafts 2023-09-30 22:30:08 +08:00
a.ll add some language drafts 2023-09-30 22:30:08 +08:00
a.o add some language drafts 2023-09-30 22:30:08 +08:00
a.out add some language drafts 2023-09-30 22:30:08 +08:00
b.out add some language drafts 2023-09-30 22:30:08 +08:00
README add some language drafts 2023-09-30 22:30:08 +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/