still support LLVM4 for emscripten
This commit is contained in:
parent
52d7740277
commit
23dfb42ab3
@ -16,8 +16,14 @@
|
|||||||
#include "llvm/Object/Archive.h"
|
#include "llvm/Object/Archive.h"
|
||||||
#include "llvm/Object/ObjectFile.h"
|
#include "llvm/Object/ObjectFile.h"
|
||||||
#include "llvm/Bitcode/BitcodeWriterPass.h"
|
#include "llvm/Bitcode/BitcodeWriterPass.h"
|
||||||
|
|
||||||
#include "llvm/IR/CallSite.h"
|
#include "llvm/IR/CallSite.h"
|
||||||
|
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
#include "llvm/ADT/Optional.h"
|
#include "llvm/ADT/Optional.h"
|
||||||
|
#else
|
||||||
|
#include <cstdlib>
|
||||||
|
#endif
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===
|
//===----------------------------------------------------------------------===
|
||||||
//
|
//
|
||||||
@ -170,7 +176,14 @@ extern "C" void LLVMRustAddCallSiteAttribute(LLVMValueRef Instr, unsigned Index,
|
|||||||
LLVMRustAttribute RustAttr) {
|
LLVMRustAttribute RustAttr) {
|
||||||
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
||||||
Attribute Attr = Attribute::get(Call->getContext(), fromRust(RustAttr));
|
Attribute Attr = Attribute::get(Call->getContext(), fromRust(RustAttr));
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
Call.addAttribute(Index, Attr);
|
Call.addAttribute(Index, Attr);
|
||||||
|
#else
|
||||||
|
AttrBuilder B(Attr);
|
||||||
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
|
Call->getContext(), Index,
|
||||||
|
AttributeSet::get(Call->getContext(), Index, B)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddAlignmentCallSiteAttr(LLVMValueRef Instr,
|
extern "C" void LLVMRustAddAlignmentCallSiteAttr(LLVMValueRef Instr,
|
||||||
@ -179,8 +192,14 @@ extern "C" void LLVMRustAddAlignmentCallSiteAttr(LLVMValueRef Instr,
|
|||||||
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addAlignmentAttr(Bytes);
|
B.addAlignmentAttr(Bytes);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
Call.setAttributes(Call.getAttributes().addAttributes(
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
Call->getContext(), Index, B));
|
Call->getContext(), Index, B));
|
||||||
|
#else
|
||||||
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
|
Call->getContext(), Index,
|
||||||
|
AttributeSet::get(Call->getContext(), Index, B)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddDereferenceableCallSiteAttr(LLVMValueRef Instr,
|
extern "C" void LLVMRustAddDereferenceableCallSiteAttr(LLVMValueRef Instr,
|
||||||
@ -189,8 +208,14 @@ extern "C" void LLVMRustAddDereferenceableCallSiteAttr(LLVMValueRef Instr,
|
|||||||
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addDereferenceableAttr(Bytes);
|
B.addDereferenceableAttr(Bytes);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
Call.setAttributes(Call.getAttributes().addAttributes(
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
Call->getContext(), Index, B));
|
Call->getContext(), Index, B));
|
||||||
|
#else
|
||||||
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
|
Call->getContext(), Index,
|
||||||
|
AttributeSet::get(Call->getContext(), Index, B)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddDereferenceableOrNullCallSiteAttr(LLVMValueRef Instr,
|
extern "C" void LLVMRustAddDereferenceableOrNullCallSiteAttr(LLVMValueRef Instr,
|
||||||
@ -199,8 +224,14 @@ extern "C" void LLVMRustAddDereferenceableOrNullCallSiteAttr(LLVMValueRef Instr,
|
|||||||
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
CallSite Call = CallSite(unwrap<Instruction>(Instr));
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addDereferenceableOrNullAttr(Bytes);
|
B.addDereferenceableOrNullAttr(Bytes);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
Call.setAttributes(Call.getAttributes().addAttributes(
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
Call->getContext(), Index, B));
|
Call->getContext(), Index, B));
|
||||||
|
#else
|
||||||
|
Call.setAttributes(Call.getAttributes().addAttributes(
|
||||||
|
Call->getContext(), Index,
|
||||||
|
AttributeSet::get(Call->getContext(), Index, B)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddFunctionAttribute(LLVMValueRef Fn, unsigned Index,
|
extern "C" void LLVMRustAddFunctionAttribute(LLVMValueRef Fn, unsigned Index,
|
||||||
@ -208,7 +239,11 @@ extern "C" void LLVMRustAddFunctionAttribute(LLVMValueRef Fn, unsigned Index,
|
|||||||
Function *A = unwrap<Function>(Fn);
|
Function *A = unwrap<Function>(Fn);
|
||||||
Attribute Attr = Attribute::get(A->getContext(), fromRust(RustAttr));
|
Attribute Attr = Attribute::get(A->getContext(), fromRust(RustAttr));
|
||||||
AttrBuilder B(Attr);
|
AttrBuilder B(Attr);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
A->addAttributes(Index, B);
|
A->addAttributes(Index, B);
|
||||||
|
#else
|
||||||
|
A->addAttributes(Index, AttributeSet::get(A->getContext(), Index, B));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddAlignmentAttr(LLVMValueRef Fn,
|
extern "C" void LLVMRustAddAlignmentAttr(LLVMValueRef Fn,
|
||||||
@ -217,7 +252,11 @@ extern "C" void LLVMRustAddAlignmentAttr(LLVMValueRef Fn,
|
|||||||
Function *A = unwrap<Function>(Fn);
|
Function *A = unwrap<Function>(Fn);
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addAlignmentAttr(Bytes);
|
B.addAlignmentAttr(Bytes);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
A->addAttributes(Index, B);
|
A->addAttributes(Index, B);
|
||||||
|
#else
|
||||||
|
A->addAttributes(Index, AttributeSet::get(A->getContext(), Index, B));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddDereferenceableAttr(LLVMValueRef Fn, unsigned Index,
|
extern "C" void LLVMRustAddDereferenceableAttr(LLVMValueRef Fn, unsigned Index,
|
||||||
@ -225,7 +264,11 @@ extern "C" void LLVMRustAddDereferenceableAttr(LLVMValueRef Fn, unsigned Index,
|
|||||||
Function *A = unwrap<Function>(Fn);
|
Function *A = unwrap<Function>(Fn);
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addDereferenceableAttr(Bytes);
|
B.addDereferenceableAttr(Bytes);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
A->addAttributes(Index, B);
|
A->addAttributes(Index, B);
|
||||||
|
#else
|
||||||
|
A->addAttributes(Index, AttributeSet::get(A->getContext(), Index, B));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddDereferenceableOrNullAttr(LLVMValueRef Fn,
|
extern "C" void LLVMRustAddDereferenceableOrNullAttr(LLVMValueRef Fn,
|
||||||
@ -234,7 +277,11 @@ extern "C" void LLVMRustAddDereferenceableOrNullAttr(LLVMValueRef Fn,
|
|||||||
Function *A = unwrap<Function>(Fn);
|
Function *A = unwrap<Function>(Fn);
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addDereferenceableOrNullAttr(Bytes);
|
B.addDereferenceableOrNullAttr(Bytes);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
A->addAttributes(Index, B);
|
A->addAttributes(Index, B);
|
||||||
|
#else
|
||||||
|
A->addAttributes(Index, AttributeSet::get(A->getContext(), Index, B));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAddFunctionAttrStringValue(LLVMValueRef Fn,
|
extern "C" void LLVMRustAddFunctionAttrStringValue(LLVMValueRef Fn,
|
||||||
@ -244,7 +291,11 @@ extern "C" void LLVMRustAddFunctionAttrStringValue(LLVMValueRef Fn,
|
|||||||
Function *F = unwrap<Function>(Fn);
|
Function *F = unwrap<Function>(Fn);
|
||||||
AttrBuilder B;
|
AttrBuilder B;
|
||||||
B.addAttribute(Name, Value);
|
B.addAttribute(Name, Value);
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
F->addAttributes(Index, B);
|
F->addAttributes(Index, B);
|
||||||
|
#else
|
||||||
|
F->addAttributes(Index, AttributeSet::get(F->getContext(), Index, B));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn,
|
extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn,
|
||||||
@ -254,7 +305,12 @@ extern "C" void LLVMRustRemoveFunctionAttributes(LLVMValueRef Fn,
|
|||||||
Attribute Attr = Attribute::get(F->getContext(), fromRust(RustAttr));
|
Attribute Attr = Attribute::get(F->getContext(), fromRust(RustAttr));
|
||||||
AttrBuilder B(Attr);
|
AttrBuilder B(Attr);
|
||||||
auto PAL = F->getAttributes();
|
auto PAL = F->getAttributes();
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
auto PALNew = PAL.removeAttributes(F->getContext(), Index, B);
|
auto PALNew = PAL.removeAttributes(F->getContext(), Index, B);
|
||||||
|
#else
|
||||||
|
const AttributeSet PALNew = PAL.removeAttributes(
|
||||||
|
F->getContext(), Index, AttributeSet::get(F->getContext(), Index, B));
|
||||||
|
#endif
|
||||||
F->setAttributes(PALNew);
|
F->setAttributes(PALNew);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -304,6 +360,7 @@ enum class LLVMRustSynchronizationScope {
|
|||||||
CrossThread,
|
CrossThread,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
static SyncScope::ID fromRust(LLVMRustSynchronizationScope Scope) {
|
static SyncScope::ID fromRust(LLVMRustSynchronizationScope Scope) {
|
||||||
switch (Scope) {
|
switch (Scope) {
|
||||||
case LLVMRustSynchronizationScope::SingleThread:
|
case LLVMRustSynchronizationScope::SingleThread:
|
||||||
@ -314,6 +371,18 @@ static SyncScope::ID fromRust(LLVMRustSynchronizationScope Scope) {
|
|||||||
report_fatal_error("bad SynchronizationScope.");
|
report_fatal_error("bad SynchronizationScope.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static SynchronizationScope fromRust(LLVMRustSynchronizationScope Scope) {
|
||||||
|
switch (Scope) {
|
||||||
|
case LLVMRustSynchronizationScope::SingleThread:
|
||||||
|
return SingleThread;
|
||||||
|
case LLVMRustSynchronizationScope::CrossThread:
|
||||||
|
return CrossThread;
|
||||||
|
default:
|
||||||
|
report_fatal_error("bad SynchronizationScope.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C" LLVMValueRef
|
extern "C" LLVMValueRef
|
||||||
LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
|
LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
|
||||||
@ -353,6 +422,18 @@ extern "C" void LLVMRustAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm)
|
|||||||
|
|
||||||
typedef DIBuilder *LLVMRustDIBuilderRef;
|
typedef DIBuilder *LLVMRustDIBuilderRef;
|
||||||
|
|
||||||
|
#if LLVM_VERSION_LT(5, 0)
|
||||||
|
typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;
|
||||||
|
|
||||||
|
namespace llvm {
|
||||||
|
DEFINE_ISA_CONVERSION_FUNCTIONS(Metadata, LLVMMetadataRef)
|
||||||
|
|
||||||
|
inline Metadata **unwrap(LLVMMetadataRef *Vals) {
|
||||||
|
return reinterpret_cast<Metadata **>(Vals);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
template <typename DIT> DIT *unwrapDIPtr(LLVMMetadataRef Ref) {
|
template <typename DIT> DIT *unwrapDIPtr(LLVMMetadataRef Ref) {
|
||||||
return (DIT *)(Ref ? unwrap<MDNode>(Ref) : nullptr);
|
return (DIT *)(Ref ? unwrap<MDNode>(Ref) : nullptr);
|
||||||
}
|
}
|
||||||
@ -468,6 +549,11 @@ static DINode::DIFlags fromRust(LLVMRustDIFlags Flags) {
|
|||||||
if (isSet(Flags & LLVMRustDIFlags::FlagRValueReference)) {
|
if (isSet(Flags & LLVMRustDIFlags::FlagRValueReference)) {
|
||||||
Result |= DINode::DIFlags::FlagRValueReference;
|
Result |= DINode::DIFlags::FlagRValueReference;
|
||||||
}
|
}
|
||||||
|
#if LLVM_VERSION_LE(4, 0)
|
||||||
|
if (isSet(Flags & LLVMRustDIFlags::FlagExternalTypeRef)) {
|
||||||
|
Result |= DINode::DIFlags::FlagExternalTypeRef;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (isSet(Flags & LLVMRustDIFlags::FlagIntroducedVirtual)) {
|
if (isSet(Flags & LLVMRustDIFlags::FlagIntroducedVirtual)) {
|
||||||
Result |= DINode::DIFlags::FlagIntroducedVirtual;
|
Result |= DINode::DIFlags::FlagIntroducedVirtual;
|
||||||
}
|
}
|
||||||
@ -566,7 +652,9 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreatePointerType(
|
|||||||
uint64_t SizeInBits, uint32_t AlignInBits, const char *Name) {
|
uint64_t SizeInBits, uint32_t AlignInBits, const char *Name) {
|
||||||
return wrap(Builder->createPointerType(unwrapDI<DIType>(PointeeTy),
|
return wrap(Builder->createPointerType(unwrapDI<DIType>(PointeeTy),
|
||||||
SizeInBits, AlignInBits,
|
SizeInBits, AlignInBits,
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
/* DWARFAddressSpace */ None,
|
/* DWARFAddressSpace */ None,
|
||||||
|
#endif
|
||||||
Name));
|
Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -737,8 +825,15 @@ LLVMRustDIBuilderCreateNameSpace(LLVMRustDIBuilderRef Builder,
|
|||||||
LLVMMetadataRef Scope, const char *Name,
|
LLVMMetadataRef Scope, const char *Name,
|
||||||
LLVMMetadataRef File, unsigned LineNo) {
|
LLVMMetadataRef File, unsigned LineNo) {
|
||||||
return wrap(Builder->createNameSpace(
|
return wrap(Builder->createNameSpace(
|
||||||
unwrapDI<DIDescriptor>(Scope), Name,
|
unwrapDI<DIDescriptor>(Scope), Name
|
||||||
|
#if LLVM_VERSION_LT(5, 0)
|
||||||
|
,
|
||||||
|
unwrapDI<DIFile>(File), LineNo
|
||||||
|
#endif
|
||||||
|
#if LLVM_VERSION_GE(4, 0)
|
||||||
|
,
|
||||||
false // ExportSymbols (only relevant for C++ anonymous namespaces)
|
false // ExportSymbols (only relevant for C++ anonymous namespaces)
|
||||||
|
#endif
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -767,7 +862,12 @@ extern "C" int64_t LLVMRustDIBuilderCreateOpDeref() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int64_t LLVMRustDIBuilderCreateOpPlusUconst() {
|
extern "C" int64_t LLVMRustDIBuilderCreateOpPlusUconst() {
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
return dwarf::DW_OP_plus_uconst;
|
return dwarf::DW_OP_plus_uconst;
|
||||||
|
#else
|
||||||
|
// older LLVM used `plus` to behave like `plus_uconst`.
|
||||||
|
return dwarf::DW_OP_plus;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustWriteTypeToString(LLVMTypeRef Ty, RustStringRef Str) {
|
extern "C" void LLVMRustWriteTypeToString(LLVMTypeRef Ty, RustStringRef Str) {
|
||||||
@ -839,12 +939,21 @@ extern "C" void LLVMRustUnpackOptimizationDiagnostic(
|
|||||||
*FunctionOut = wrap(&Opt->getFunction());
|
*FunctionOut = wrap(&Opt->getFunction());
|
||||||
|
|
||||||
RawRustStringOstream FilenameOS(FilenameOut);
|
RawRustStringOstream FilenameOS(FilenameOut);
|
||||||
|
#if LLVM_VERSION_GE(5,0)
|
||||||
DiagnosticLocation loc = Opt->getLocation();
|
DiagnosticLocation loc = Opt->getLocation();
|
||||||
if (loc.isValid()) {
|
if (loc.isValid()) {
|
||||||
*Line = loc.getLine();
|
*Line = loc.getLine();
|
||||||
*Column = loc.getColumn();
|
*Column = loc.getColumn();
|
||||||
FilenameOS << loc.getFilename();
|
FilenameOS << loc.getFilename();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
const DebugLoc &loc = Opt->getDebugLoc();
|
||||||
|
if (loc) {
|
||||||
|
*Line = loc.getLine();
|
||||||
|
*Column = loc.getCol();
|
||||||
|
FilenameOS << cast<DIScope>(loc.getScope())->getFilename();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RawRustStringOstream MessageOS(MessageOut);
|
RawRustStringOstream MessageOS(MessageOut);
|
||||||
MessageOS << Opt->getMsg();
|
MessageOS << Opt->getMsg();
|
||||||
@ -1264,6 +1373,7 @@ LLVMRustModuleCost(LLVMModuleRef M) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Vector reductions:
|
// Vector reductions:
|
||||||
|
#if LLVM_VERSION_GE(5, 0)
|
||||||
extern "C" LLVMValueRef
|
extern "C" LLVMValueRef
|
||||||
LLVMRustBuildVectorReduceFAdd(LLVMBuilderRef B, LLVMValueRef Acc, LLVMValueRef Src) {
|
LLVMRustBuildVectorReduceFAdd(LLVMBuilderRef B, LLVMValueRef Acc, LLVMValueRef Src) {
|
||||||
return wrap(unwrap(B)->CreateFAddReduce(unwrap(Acc),unwrap(Src)));
|
return wrap(unwrap(B)->CreateFAddReduce(unwrap(Acc),unwrap(Src)));
|
||||||
@ -1309,6 +1419,62 @@ LLVMRustBuildVectorReduceFMax(LLVMBuilderRef B, LLVMValueRef Src, bool NoNaN) {
|
|||||||
return wrap(unwrap(B)->CreateFPMaxReduce(unwrap(Src), NoNaN));
|
return wrap(unwrap(B)->CreateFPMaxReduce(unwrap(Src), NoNaN));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceFAdd(LLVMBuilderRef, LLVMValueRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceFMul(LLVMBuilderRef, LLVMValueRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceAdd(LLVMBuilderRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceMul(LLVMBuilderRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceAnd(LLVMBuilderRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceOr(LLVMBuilderRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceXor(LLVMBuilderRef, LLVMValueRef) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceMin(LLVMBuilderRef, LLVMValueRef, bool) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceMax(LLVMBuilderRef, LLVMValueRef, bool) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceFMin(LLVMBuilderRef, LLVMValueRef, bool) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMRustBuildVectorReduceFMax(LLVMBuilderRef, LLVMValueRef, bool) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if LLVM_VERSION_LT(4, 0)
|
||||||
|
extern "C" LLVMValueRef
|
||||||
|
LLVMBuildExactUDiv(LLVMBuilderRef B, LLVMValueRef LHS,
|
||||||
|
LLVMValueRef RHS, const char *Name) {
|
||||||
|
return wrap(unwrap(B)->CreateExactUDiv(unwrap(LHS), unwrap(RHS), Name));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LLVM_VERSION_GE(6, 0)
|
#if LLVM_VERSION_GE(6, 0)
|
||||||
extern "C" LLVMValueRef
|
extern "C" LLVMValueRef
|
||||||
LLVMRustBuildMinNum(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS) {
|
LLVMRustBuildMinNum(LLVMBuilderRef B, LLVMValueRef LHS, LLVMValueRef RHS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user