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

LLVM 14.0: Support btf_tag-related annotations in metadata types #188

Closed
RyanGlScott opened this issue May 2, 2022 · 0 comments
Closed

Comments

@RyanGlScott
Copy link
Contributor

LLVM 14.0 adds an additional annotations field to the following pieces of metadata in service of supporting the new btf_tag attribute:

As these are pretty common, most programs compiled with -g using Clang 14.0.0 will contain them. Here is one such example:

int main(int argc, char *argv[]) {
  return 0;
}

When compiled with clang test.c -c -emit-llvm -g with Clang 14.0.0, llvm-pretty-bc-parser will be unable to handle it:

λ> parseBitCodeFromFile  "../../C/test.bc"
Left (Error {errContext = ["METADATA_DERIVED_TYPE","METADATA_BLOCK","@main","FUNCTION_BLOCK","FUNCTION_BLOCK_ID","value symbol table","MODULE_BLOCK","Bitstream"], errMessage = "Invalid record size: 14\nExpected size between 12 and 13\nAre you sure you're using a supported version of LLVM/Clang?\nCheck here: https://github.com/GaloisInc/llvm-pretty-bc-parser\n"})
RyanGlScott added a commit to GaloisInc/llvm-pretty that referenced this issue Apr 5, 2023
RyanGlScott added a commit that referenced this issue Apr 5, 2023
RyanGlScott added a commit that referenced this issue Apr 7, 2023
RyanGlScott added a commit to GaloisInc/llvm-pretty that referenced this issue Apr 10, 2023
RyanGlScott added a commit to GaloisInc/llvm-pretty that referenced this issue Apr 10, 2023
RyanGlScott added a commit that referenced this issue Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant