-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: emit metadata for exported global variables #15349
Conversation
One use case is to genearte BTF information from global variable's metadata. Signed-off-by: Tw <weii.tan>
By chance could this affect/fix #15095? |
@squeek502 I think so. Because this patch adds the missing connection between variable declearation and its debug information. |
Close by accident, reopen. |
Signed-off-by: Tw <weii.tan>
Doesn't seem to do anything for #15095 |
Can you please show the difference in LLVM IR of this change as well as some clang generated IR for comparison? |
@andrewrk Sure, here it is:
Before:
After:
As you can see, the metadata for Clang:
|
Thanks @tw4452852! Looks great. |
One use case is to genearte BTF information from global variable's metadata.