摘要:
#include "llvm/ExecutionEngine/Orc/LLJIT.h" #include "llvm/IR/Function.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Module.h" #include "llvm/Su 阅读全文
摘要:
words demo lexer.l: %option noyywrap noline %{ #include <iostream> #include "parser.h" #define YY_DECL yy::parser::symbol_type yylex() #define yytermi 阅读全文
摘要:
#include <iostream> #include <format> int main(int argc, char* argv[]) { if (argc > 1) { char prefix; char* opt; int valIndex; char* val; for (size_t 阅读全文
摘要:
#include <iostream> #include <memory> using namespace std; class Base { public: virtual ~Base() = default; /* 使其多态 */ }; class A : public Base { publi 阅读全文
摘要:
#include <iostream> #include "lexer.h" #define yylex aaslex #define yy_scan_string aas_scan_string #define yy_delete_buffer aas_delete_buffer extern c 阅读全文
摘要:
#include <iostream> #include "lexer.h" #define yylex aaslex #define yy_scan_string aas_scan_string #define yy_delete_buffer aas_delete_buffer int main 阅读全文
摘要:
想要什么: int fun(int p1) { int r = 0; for(int i = 0; i < p1; i++) { r = r + i + p1; } return r; } IR: define i32 @fun(i32 %p1) { entry: %r = alloca i32, 阅读全文
摘要:
想要什么: int fun(int p1) { if(p1 < 5) return 1; else return 2; } IR: define i32 @fun(i32 %p1) { entry: %cmp = icmp slt i32 %p1, 5 br i1 %cmp, label %then 阅读全文
摘要:
想要什么: int add1(int p1) { return 1 + p1; } IR: define i32 @add1(i32 %p1) { entry: %retVal = add i32 1, %p1 ret i32 %retVal } #include "llvm/ExecutionEn 阅读全文
摘要:
在github上下载最新的Release版本的源码zip包 解压后进入"llvm-project-llvmorg-12.0.0"目录下 运行cmake > cmake -S .\llvm\ -B build -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_B 阅读全文