-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable llvm
- Loading branch information
Showing
5 changed files
with
19 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
use std::ptr::null_mut; | ||
|
||
use llvm_sys::core::{ | ||
LLVMAddFunction, LLVMContextCreate, LLVMCreateBuilderInContext, LLVMFunctionType, | ||
LLVMInt32TypeInContext, LLVMModuleCreateWithName, | ||
}; | ||
// use llvm_sys::core::{ | ||
// LLVMAddFunction, LLVMContextCreate, LLVMCreateBuilderInContext, LLVMFunctionType, | ||
// LLVMInt32TypeInContext, LLVMModuleCreateWithName, | ||
// }; | ||
|
||
use crate::base::codegen::StaticData; | ||
|
||
pub fn convert(tvm_data: StaticData) { | ||
unsafe { | ||
let context = LLVMContextCreate(); | ||
let module = LLVMModuleCreateWithName(b"main\0".as_ptr() as *const i8); | ||
let builder = LLVMCreateBuilderInContext(context); | ||
let i32_ty = LLVMInt32TypeInContext(context); | ||
// 创建main函数 | ||
let main_ty = LLVMFunctionType(i32_ty, null_mut(), 0, 0); | ||
let main_func = LLVMAddFunction(module, b"main\0".as_ptr() as *const _, main_ty); | ||
// let context = LLVMContextCreate(); | ||
// let module = LLVMModuleCreateWithName(b"main\0".as_ptr() as *const i8); | ||
// let builder = LLVMCreateBuilderInContext(context); | ||
// let i32_ty = LLVMInt32TypeInContext(context); | ||
// // 创建main函数 | ||
// let main_ty = LLVMFunctionType(i32_ty, null_mut(), 0, 0); | ||
// let main_func = LLVMAddFunction(module, b"main\0".as_ptr() as *const _, main_ty); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
#!/bin/sh | ||
|
||
cd cpp/script | ||
python3 gen_locales.py | ||
python3 clang_format.py | ||
cd ../../rust | ||
cargo fmt | ||
cd script | ||
python3 gen_locales.py |