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

Implement METADATA_ASSIGN_ID (DIAssignID) #258

Open
RyanGlScott opened this issue Sep 27, 2023 · 0 comments · May be fixed by #261
Open

Implement METADATA_ASSIGN_ID (DIAssignID) #258

RyanGlScott opened this issue Sep 27, 2023 · 0 comments · May be fixed by #261

Comments

@RyanGlScott
Copy link
Contributor

This was introduced in LLVM 17.0 in llvm/llvm-project@a2620e0. See this post for the motivation behind DIAssignID. A small example of this in the wild can be seen here:

__attribute__((__noinline__)) void f(int* x) {}

int main(void) {
  int x;
  f(&x);
  return 0;
}

If you compile this with:

$ clang -c -emit-llvm -g -O1 test.c

Then llvm-pretty-bc-parser will fail to load it:

λ> parseBitCodeFromFile "test.bc" >>= putStrLn . either formatError show
unknown record code: 47
from:
	METADATA_BLOCK
	@main
	FUNCTION_BLOCK
	FUNCTION_BLOCK_ID
	value symbol table
	MODULE_BLOCK
	Bitstream
RyanGlScott added a commit to GaloisInc/llvm-pretty that referenced this issue Sep 28, 2023
See
llvm/llvm-project@a2620e0
for the LLVM commit in which this was introduced.

This is part of an eventual fix for GaloisInc/llvm-pretty-bc-parser#258.
RyanGlScott added a commit that referenced this issue Oct 3, 2023
Adding support for `DIAssigID` is very straightforward, as it doessn't have any
fields to parse (aside from `isDistinct`).

This bumps the `llvm-pretty` submodule to bring in the related changes from
GaloisInc/llvm-pretty#131.

Fixes #258.
@RyanGlScott RyanGlScott linked a pull request Oct 3, 2023 that will close this issue
RyanGlScott added a commit that referenced this issue May 20, 2024
Adding support for `DIAssigID` is very straightforward, as it doessn't have any
fields to parse (aside from `isDistinct`).

This bumps the `llvm-pretty` submodule to bring in the related changes from
GaloisInc/llvm-pretty#131.

Fixes #258.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant