-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
cg_llvm: Replace most of our DIBuilder wrappers with LLVM-C API bindings #134009
Open
Zalathar
wants to merge
25
commits into
rust-lang:master
Choose a base branch
from
Zalathar:llvm-di
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+465
−570
Open
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1d8fe72
Make our `DIFlags` match `LLVMDIFlags` in the LLVM-C API
Zalathar d759865
Introduce `DIBuilderBox`, an owning pointer to `DIBuilder`
Zalathar 362b4aa
Use `LLVMDIBuilderFinalize`
Zalathar aa9417e
Use `LLVMDIBuilderCreateNameSpace`
Zalathar 8f346a4
Use `LLVMDIBuilderCreateLexicalBlock`
Zalathar d4c0568
Use `LLVMDIBuilderCreateLexicalBlockFile`
Zalathar 2d3b7b7
Use `LLVMDIBuilderCreateDebugLocation`
Zalathar ed9a4d2
Use `LLVMDIBuilderCreateSubroutineType`
Zalathar 71e8169
Use `LLVMDIBuilderCreateUnionType`
Zalathar 6230db2
Use `LLVMDIBuilderCreateArrayType`
Zalathar 6596c94
Use `LLVMDIBuilderCreateBasicType`
Zalathar 50194be
Use `LLVMDIBuilderCreatePointerType`
Zalathar 3be1ccb
Use `LLVMDIBuilderCreateStructType`
Zalathar 1629274
Use `LLVMDIBuilderCreateMemberType`
Zalathar 86d7061
Use `LLVMDIBuilderCreateStaticMemberType`
Zalathar ef9cf38
Use `LLVMDIBuilderCreateTypedef`
Zalathar c04657f
Use `LLVMDIBuilderGetOrCreateSubrange`
Zalathar 7e5ed45
Use `LLVMDIBuilderGetOrCreateArray`
Zalathar 1a3ef56
Use `LLVMDIBuilderCreateExpression` and adjust our insert function
Zalathar a740567
Use constants for DWARF opcodes, instead of FFI calls
Zalathar b3fc61f
Properly unwrap `LLVMDIBuilderRef` in the remaining wrapper functions
Zalathar 057f238
Remove `LLVMRustDIFlags`
Zalathar 505665a
Add FIXME for auditing optional parameters passed to DIBuilder
Zalathar 1837dbe
Explain why the remaining `LLVMRustDIBuilder*` wrappers exist
Zalathar d6297f8
Explain why (some) pointer/length strings are `*const c_uchar`
Zalathar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These have to be positive numbers, right?
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.
LLVM declares them as
int64_t
, in both the C and C++ APIs. 🤷♂️Or are you suggesting that we assert that they're non-negative?
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.
I am indeed suggesting that.