Remove dead code
This commit is contained in:
parent
64481926f4
commit
faf8ad9212
@ -3523,11 +3523,11 @@ fn worker_thread(thread_index: u32, cpu_count: *u32) void {
|
||||
const debug_info = false;
|
||||
|
||||
for (thread.external_functions.slice()) |*nat_function| {
|
||||
_ = llvm_get_function(thread, nat_function, true);
|
||||
llvm_emit_function_declaration(thread, nat_function);
|
||||
}
|
||||
|
||||
for (thread.functions.slice()) |*nat_function| {
|
||||
_ = llvm_get_function(thread, &nat_function.declaration, false);
|
||||
llvm_emit_function_declaration(thread, &nat_function.declaration);
|
||||
}
|
||||
|
||||
for (thread.global_variables.slice()) |*nat_global| {
|
||||
@ -4017,9 +4017,8 @@ fn llvm_get_file(thread: *Thread, file_index: u32) *LLVMFile {
|
||||
}
|
||||
}
|
||||
|
||||
fn llvm_get_function(thread: *Thread, nat_function: *Function.Declaration, override_extern: bool) *LLVM.Value.Constant.Function {
|
||||
if (nat_function.global_symbol.value.llvm) |llvm| return llvm.toFunction() orelse unreachable else {
|
||||
_ = override_extern; // autofix
|
||||
fn llvm_emit_function_declaration(thread: *Thread, nat_function: *Function.Declaration) void {
|
||||
assert(nat_function.global_symbol.value.llvm == null);
|
||||
const function_name = thread.identifiers.get(nat_function.global_symbol.global_declaration.declaration.name) orelse unreachable;
|
||||
const nat_function_type = nat_function.get_type();
|
||||
const function_type = llvm_get_type(thread, &nat_function_type.type);
|
||||
@ -4096,8 +4095,6 @@ fn llvm_get_function(thread: *Thread, nat_function: *Function.Declaration, overr
|
||||
}
|
||||
|
||||
nat_function.global_symbol.value.llvm = function.toValue();
|
||||
return function;
|
||||
}
|
||||
}
|
||||
|
||||
fn create_basic_block(thread: *Thread) *BasicBlock {
|
||||
|
Loading…
x
Reference in New Issue
Block a user