llvm-wrapper: adapt for LLVM API change
This commit is contained in:
parent
1c7b36d4db
commit
a89d014a21
1 changed files with 6 additions and 0 deletions
|
@ -411,8 +411,14 @@ LLVMRustInlineAsm(LLVMTypeRef Ty, char *AsmString, size_t AsmStringLen,
|
||||||
|
|
||||||
extern "C" bool LLVMRustInlineAsmVerify(LLVMTypeRef Ty, char *Constraints,
|
extern "C" bool LLVMRustInlineAsmVerify(LLVMTypeRef Ty, char *Constraints,
|
||||||
size_t ConstraintsLen) {
|
size_t ConstraintsLen) {
|
||||||
|
#if LLVM_VERSION_LT(15, 0)
|
||||||
return InlineAsm::Verify(unwrap<FunctionType>(Ty),
|
return InlineAsm::Verify(unwrap<FunctionType>(Ty),
|
||||||
StringRef(Constraints, ConstraintsLen));
|
StringRef(Constraints, ConstraintsLen));
|
||||||
|
#else
|
||||||
|
// llvm::Error converts to true if it is an error.
|
||||||
|
return !llvm::errorToBool(InlineAsm::verify(
|
||||||
|
unwrap<FunctionType>(Ty), StringRef(Constraints, ConstraintsLen)));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm,
|
extern "C" void LLVMRustAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue