Commit Graph

18 Commits

Author SHA1 Message Date
Andrew Kelley 72e00805a6 llvm.Builder: add support for more instruction metadata
mlugg: this is cherry-picked from Andrew's nosanitize branch (with
Jacob's fixes squashed in) since I needed this for `unpredictable` and
`prof` metadata. The nosanitize-specific changes are reverted in the
next commit.

Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
2024-08-27 00:41:49 +01:00
Andrew Kelley f303c3943f Revert "Merge pull request #20380 from tau-dev/master"
This reverts commit 397be0c9cc, reversing
changes made to 18d412ab2f.

Caused test failures in master branch.
2024-07-21 02:44:58 -07:00
Tau 177b3359a1 llvm: Do not generate static member definitions
They were not helping LLDB and actively throwing off GDB.
Also: clean up some llvm.Builder and llvm.ir definitions that are no
longer necessary.
2024-07-19 17:51:38 +02:00
Tau 359bbdd574 llvm: encode variables as DW_TAG_imported_declaration
Now we get working global variable lookup in GDB! LLDB still re-mangles,
and it looks like we can't do much about that for now.

Also: translate non-owning type declarations into typedefs.
2024-07-19 17:51:37 +02:00
Tau 876258abe4 llvm: set precise scopes on namespace types and variables
This will allow accessing non-local declarations from debuggers, which,
AFAICT, was impossible before.
Getting scopes right already works for type declarations and functions,
but will need some fiddling for variables:

For those, I tried imitating what Clang does for static member
variables, but LLDB tries to re-mangle those and then fails at lookup,
while GDB outright crashes. Hopefully I can find some other dwarven
incantation to do the right thing.
2024-07-19 17:46:34 +02:00
antlilja 637b1d606d LLVM Builder: Emit binary op optional flags for exact and no wrap 2024-04-06 14:57:46 -04:00
antlilja 147beec7da LLVM Builder: Fix emission of enum debug enumerator info bitcode 2024-02-29 12:02:13 -08:00
antlilja 73a16d440b Builder: Reduce size of DebugLoc abbrev 2024-02-26 01:02:16 +01:00
antlilja 9754d6d0a0 Builder: Use BlockInfo block to reduce size of bitcode 2024-02-26 01:00:58 +01:00
antlilja 9b39e824cd Builder: Emit metadata attachment for globals 2024-02-24 02:28:00 +01:00
Jacob Young a8708dbf3b Builder: fix inconsequential llvm ir flag syntax 2024-02-23 21:12:57 +01:00
Jacob Young 03eb332d3c Builder: fix aliases in bitcode 2024-02-23 18:17:14 +01:00
Jacob Young 7f3ade6dea Builder: fix x86_fp80 constants in bitcode 2024-02-23 09:15:58 +01:00
Jacob Young 6abb432598 Builder: implement opaque structs in bitcode 2024-02-23 07:51:38 +01:00
Jacob Young 8d0f6605fe Builder: sync distinct bits with previous implementation 2024-02-23 03:23:49 +01:00
antlilja dfde194287 LLVM Builder: Make some Metadata no longer be distinct 2024-02-23 03:12:54 +01:00
antlilja de536e8473 LLVM Builder: Emit metadata kinds and function metadata attachments 2024-02-22 15:29:28 +01:00
Jacob Young 4b215e3a11 Builder: support printing metadata in llvm ir 2024-02-22 08:54:35 +01:00