diff options
| author | cynecx <me@cynecx.net> | 2021-09-04 19:25:09 +0200 |
|---|---|---|
| committer | cynecx <me@cynecx.net> | 2021-12-03 23:51:49 +0100 |
| commit | 91021de1f67de546b7ef41e03fc787f03ecf2239 (patch) | |
| tree | 2e809500921ea4bd58327c054b6965579cd74a81 /compiler/rustc_llvm/llvm-wrapper | |
| parent | 491dd1f387e4f0b167e35560a97efc9949304640 (diff) | |
| download | rust-91021de1f67de546b7ef41e03fc787f03ecf2239.tar.gz rust-91021de1f67de546b7ef41e03fc787f03ecf2239.zip | |
LLVM codgen support for unwinding inline assembly
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index ccfc6bdc735..3fbf020c552 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -446,11 +446,19 @@ LLVMRustInlineAsm(LLVMTypeRef Ty, char *AsmString, size_t AsmStringLen, char *Constraints, size_t ConstraintsLen, LLVMBool HasSideEffects, LLVMBool IsAlignStack, LLVMRustAsmDialect Dialect, LLVMBool CanThrow) { +#if LLVM_VERSION_GE(13, 0) return wrap(InlineAsm::get(unwrap<FunctionType>(Ty), StringRef(AsmString, AsmStringLen), StringRef(Constraints, ConstraintsLen), HasSideEffects, IsAlignStack, fromRust(Dialect), CanThrow)); +#else + return wrap(InlineAsm::get(unwrap<FunctionType>(Ty), + StringRef(AsmString, AsmStringLen), + StringRef(Constraints, ConstraintsLen), + HasSideEffects, IsAlignStack, + fromRust(Dialect))); +#endif } extern "C" bool LLVMRustInlineAsmVerify(LLVMTypeRef Ty, char *Constraints, |
