I am doing an information flow project in LLVM, and I need to do some annotations to start computing the data flow.
Typically, if I want to annotate a FILE* fp, I can take the following way:
FILE* attribute((annotate(“my_annotation”))) fp;
and then analyze some @llvm.annotations instructions to capture the information flow.
However, if I want to do some further annotation like annotating the file that fp points to rather than annotating the FILE pointer only, is there a way(with attribute grammar) to do that? For some simple types like int, float I can simply compute the data flow from the pointer to pointee, but for some complex types like FILE* I have no good idea now.
Any hints on that are welcome, thank you very much!