Implement external function linkage in lib
This commit is contained in:
parent
4eaa365674
commit
067c84e93e
@ -5,7 +5,7 @@
|
||||
use std::{collections::HashMap, ffi::CString, ptr::null_mut};
|
||||
|
||||
use llvm_sys::{
|
||||
LLVMIntPredicate,
|
||||
LLVMIntPredicate, LLVMLinkage,
|
||||
analysis::LLVMVerifyModule,
|
||||
core::*,
|
||||
prelude::*,
|
||||
@ -204,6 +204,11 @@ impl FunctionHolder {
|
||||
unsafe {
|
||||
let own_function = *module.functions.get(&self.value).unwrap();
|
||||
|
||||
if self.data.flags.is_extern {
|
||||
LLVMSetLinkage(own_function.value_ref, LLVMLinkage::LLVMExternalLinkage);
|
||||
return;
|
||||
}
|
||||
|
||||
for block in &self.blocks {
|
||||
if block.data.deleted {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user