mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Rollup merge of #99185 - krasimirgg:llvm-wrapper-inlineasm, r=nikic
llvm-wrapper: adapt for LLVM API change This adapts RustWrapper's ` LLVMRustInlineAsmVerify` for LLVM commit https://github.com/llvm/llvm-project/commit/00797b88e0113aeea03045b18b3f63332f850dfe.
This commit is contained in:
@@ -411,8 +411,14 @@ LLVMRustInlineAsm(LLVMTypeRef Ty, char *AsmString, size_t AsmStringLen,
|
||||
|
||||
extern "C" bool LLVMRustInlineAsmVerify(LLVMTypeRef Ty, char *Constraints,
|
||||
size_t ConstraintsLen) {
|
||||
#if LLVM_VERSION_LT(15, 0)
|
||||
return InlineAsm::Verify(unwrap<FunctionType>(Ty),
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user