Skip to content

Commit

Permalink
Workaround breakage in llvm.jl (#1497)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com>
  • Loading branch information
wsmoses and vchuravy authored Jun 6, 2024
1 parent e17da2c commit f8427ca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ struct CFnTypeInfo
end


@static if isdefined(LLVM, :InstructionMetadataDict)
Base.haskey(md::LLVM.InstructionMetadataDict, kind::String) =
ccall((:EnzymeGetStringMD, libEnzyme), Cvoid, (LLVM.API.LLVMValueRef, Cstring), md.inst, kind) != C_NULL

Expand All @@ -115,6 +116,7 @@ function Base.getindex(md::LLVM.InstructionMetadataDict, kind::String)

Base.setindex!(md::LLVM.InstructionMetadataDict, node::LLVM.Metadata, kind::String) =
ccall((:EnzymeSetStringMD, libEnzyme), Cvoid, (LLVM.API.LLVMValueRef, Cstring, LLVM.API.LLVMValueRef), md.inst, kind, LLVM.Value(node))
end

@cenum(CDIFFE_TYPE,
DFT_OUT_DIFF = 0, # add differential to an output struct
Expand Down

2 comments on commit f8427ca

@vchuravy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/108404

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.10 -m "<description of version>" f8427ca02357cdde67003294f9107bdc27553b40
git push origin v0.12.10

Please sign in to comment.