-
Notifications
You must be signed in to change notification settings - Fork 458
llvm.global_ctors/dtors #774
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
Conversation
Can this patch pass your tests in #760 now? |
Yes, it can pass my test now. |
Can you indicate which option you have used to pass your test, I assume that Do you think this option should always be turned on if analyzing cpp? or any code could be changed to call |
I use As for your question that whether this option should always be turned on, I think it should. My understanding of |
Can you try to turn off |
Yes it works with only For the test, I run with svf-ex. I run on out.ll as attached in #775. I manually added the following content to test destroy functions. After disassembling the out.svf.bc file I can see the correct @svf.main() function injected
|
This pr is important. To make it easier to maintain and extensible later, would you be able to add some comments for the code? Maybe, you can also put a small example in your code comments. |
Sure, glad to help. I'll add some comments soon. |
Hi @yuleisui. In the new commits, I update the pr based on your comments, and also add some comments to explain the logic. Please feel free to tell me if there is anything else I can do. |
Thanks and merged |
Sort llvm_global_ctors functions according to their priority. Also support destroy functions. See LLVM Language Reference Manual