Added function-section functionality
This commit is contained in:
@@ -95,7 +95,7 @@ static const bool assertions_on = false;
|
||||
|
||||
bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref,
|
||||
const char *filename, ZigLLVM_EmitOutputType output_type, char **error_message, bool is_debug,
|
||||
bool is_small, bool time_report)
|
||||
bool is_small, bool time_report, bool function_sections)
|
||||
{
|
||||
TimePassesIsEnabled = time_report;
|
||||
|
||||
@@ -108,6 +108,8 @@ bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMM
|
||||
TargetMachine* target_machine = reinterpret_cast<TargetMachine*>(targ_machine_ref);
|
||||
target_machine->setO0WantsFastISel(true);
|
||||
|
||||
target_machine->Options.FunctionSections = function_sections;
|
||||
|
||||
Module* module = unwrap(module_ref);
|
||||
|
||||
PassManagerBuilder *PMBuilder = new(std::nothrow) PassManagerBuilder();
|
||||
|
||||
Reference in New Issue
Block a user