Skip to content
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

stage2 LLVM debug info #11085

Merged
merged 11 commits into from
Mar 9, 2022
Merged

stage2 LLVM debug info #11085

merged 11 commits into from
Mar 9, 2022

Conversation

andrewrk
Copy link
Member

@andrewrk andrewrk commented Mar 8, 2022

Merge Checklist:

@andrewrk andrewrk changed the title LLVM debug info stage2 LLVM debug info Mar 8, 2022
andrewrk added 11 commits March 8, 2022 14:58
This commit also adds a bunch of bindings for debug info.
also fix issue with memoization and recursiveness.
Also make `namespaceToDebugScope` behave correctly for file-level
structs. Instead of being inside their own scope, they use the file
scope.
Previously, we did this so that we could insert a debug variable
declaration intrinsic on the alloca. But there is a dbg.value intrinsic
for declaring variables that are values.
Also fix UAF of Type memory in the di_type_map.
This required adjusting `Type.nameAlloc` to be used with a
general-purpose allocator and added `Type.nameAllocArena` for the arena
use case (avoids allocation sometimes).
@andrewrk
Copy link
Member Author

andrewrk commented Mar 9, 2022

Additional tests performed locally: I ran the behavior tests natively (x86_64-linux) with a debug build of LLVM and it did not trip any assertions.

@andrewrk andrewrk merged commit a917532 into master Mar 9, 2022
@andrewrk andrewrk deleted the llvm-debug-info branch March 9, 2022 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant