-
Notifications
You must be signed in to change notification settings - Fork 7
Add metadata api and set llvm 20 as default #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| module github.com/goplus/llvm | ||
|
|
||
| go 1.14 | ||
| go 1.22 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| //go:build !byollvm && !llvm14 && !llvm15 && !llvm16 && !llvm17 && !llvm18 && !llvm20 && !llvm21 | ||
| //go:build !byollvm && llvm19 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Silent breaking change for existing LLVM 19 users The old tag ( Any CI pipeline or user who was building without a version tag (relying on LLVM 19 as the default) will silently switch to LLVM 20 after this change. There is no compile-time error; the wrong LLVM version is simply picked up transparently. Consider adding a note in the PR description or README about this migration requirement. |
||
|
|
||
| package llvm | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential crash on nil
MetadataLLVMMetadataAsValuein upstream LLVM does not null-guard itsMDargument — unlike the custom wrappers inIRBindings.cpp(e.g.,LLVMSetMetadata2) which explicitly checkif (!MD). Calling this with a zero-valuedMetadata{}passesNULLacross the CGo boundary and causes an unrecoverable SIGSEGV inside LLVM's C++ runtime.Consider adding a guard: