archivesOfToyLang/tshunhue/遞歸下降分析器/LLVM/README

15 lines
384 B
Text
Raw Permalink Normal View History

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/