Implement static finalize / initialize. Version bump.

This commit is contained in:
Christoffer Lerno
2022-09-28 17:03:30 +02:00
committed by Christoffer Lerno
parent 58647043f4
commit e1b5b0b60c
33 changed files with 478 additions and 44 deletions

View File

@@ -5,6 +5,8 @@
#include "llvm/Object/ArchiveWriter.h"
#include "llvm/Object/IRObjectFile.h"
#include "llvm/Object/SymbolicFile.h"
#include "llvm-c/TargetMachine.h"
#include "llvm/Target/TargetMachine.h"
#if LLVM_VERSION_MAJOR > 13
#define LINK_SIG \
@@ -167,6 +169,12 @@ extern "C" {
int llvm_version_major = LLVM_VERSION_MAJOR;
void LLVMSetTargetMachineUseInitArray(LLVMTargetMachineRef ref, bool use_init_array)
{
auto machine = reinterpret_cast<llvm::TargetMachine *>(ref);
machine->Options.UseInitArray = use_init_array;
}
LLVMValueRef LLVMConstBswap(LLVMValueRef ConstantVal)
{
llvm::Constant *Val = llvm::unwrap<llvm::Constant>(ConstantVal);