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

Example for instrumenting source code #1

Open
ArchanaaSK opened this issue Jul 31, 2020 · 1 comment
Open

Example for instrumenting source code #1

ArchanaaSK opened this issue Jul 31, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@ArchanaaSK
Copy link

ArchanaaSK commented Jul 31, 2020

Thank you! This is very helpful. Do you have any example plugins for adding functions to source code? I would like an example for adding a new function, with simple and complex variables(like structures ), which also uses inputs form the original source code. For example, an example plugin to ASTMatcher and Rewriter/Refactoring/Replacement tools in a plugin.

@banach-space
Copy link
Owner

Hi @ArchanaaSK,

Thank you for visiting and for your question!

Do you have any example plugins for adding functions to source code?

No, I've not tried implementing anything like that for Clang. Do you have a motivating example? This could be an interesting thing to try! Although, to be perfectly honest, I'm not sure where such function should be defined.

I did implement something similar for LLVM IR. See here and here.

@banach-space banach-space added the enhancement New feature or request label Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants