diff options
| author | bors <bors@rust-lang.org> | 2022-07-13 11:10:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-13 11:10:51 +0000 |
| commit | ca4e39400ef33198e2715973d1c67a1d3cee15e7 (patch) | |
| tree | ef1ab0f047db44028413e3bdeb9ed024a8e4e491 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | a639f89d0414a34b7a72702849f3e9f95b46de5c (diff) | |
| parent | f290811aaf4a434d7bf25dda1ff16fa6bd930c8f (diff) | |
| download | rust-ca4e39400ef33198e2715973d1c67a1d3cee15e7.tar.gz rust-ca4e39400ef33198e2715973d1c67a1d3cee15e7.zip | |
Auto merge of #99203 - GuillaumeGomez:rollup-b2re0dv, r=GuillaumeGomez
Rollup of 10 pull requests Successful merges: - #98789 (rustdoc-json-types: Clean up derives.) - #98848 (Build the Clippy book as part of x.py doc) - #99020 (check non_exhaustive attr and private fields for transparent types) - #99132 (Add some autolabels for A-bootstrap and T-infra) - #99148 (Clarify that [iu]size bounds were only defined for the target arch) - #99152 (Use CSS variables to handle theming (part 2)) - #99168 (Add regression test for #74713) - #99176 (:arrow_up: rust-analyzer) - #99183 (Mention rust-analyzer maintainers when `proc_macro` bridge is changed) - #99185 (llvm-wrapper: adapt for LLVM API change) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 8c5b4e2dc96..7ac3157e7a1 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -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, |
