diff options
| author | Manuel Drehwald <git@manuel.drehwald.info> | 2025-04-04 14:24:23 -0400 | 
|---|---|---|
| committer | Manuel Drehwald <git@manuel.drehwald.info> | 2025-04-04 14:24:23 -0400 | 
| commit | b7c63a973fdfa317a01b9d676803c59edc31abdc (patch) | |
| tree | 9c85b9bcdc2f5eb4aae7a6434a58f2bd272a6a3e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | e0c8ead8802fcc314ec852a6641e08fd09307708 (diff) | |
| download | rust-b7c63a973fdfa317a01b9d676803c59edc31abdc.tar.gz rust-b7c63a973fdfa317a01b9d676803c59edc31abdc.zip | |
add autodiff batching backend
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 53df59930f4..32e6da446d7 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -384,6 +384,12 @@ static inline void AddAttributes(T *t, unsigned Index, LLVMAttributeRef *Attrs, t->setAttributes(PALNew); } +extern "C" bool LLVMRustHasAttributeAtIndex(LLVMValueRef Fn, unsigned Index, + LLVMRustAttributeKind RustAttr) { + Function *F = unwrap<Function>(Fn); + return F->hasParamAttribute(Index, fromRust(RustAttr)); +} + extern "C" void LLVMRustAddFunctionAttributes(LLVMValueRef Fn, unsigned Index, LLVMAttributeRef *Attrs, size_t AttrsLen) { @@ -636,6 +642,10 @@ static InlineAsm::AsmDialect fromRust(LLVMRustAsmDialect Dialect) { } } +extern "C" uint64_t LLVMRustGetArrayNumElements(LLVMTypeRef Ty) { + return unwrap(Ty)->getArrayNumElements(); +} + extern "C" LLVMValueRef LLVMRustInlineAsm(LLVMTypeRef Ty, char *AsmString, size_t AsmStringLen, char *Constraints, size_t ConstraintsLen, | 
