banach-space / llvm-tutor

A collection of out-of-tree LLVM passes for teaching and learning
MIT License
2.95k stars 393 forks source link

[InjectFunCall] how to redirect printf to file #73

Closed LuoRongLuoRong closed 1 year ago

LuoRongLuoRong commented 2 years ago

I wanna store infomation in a file. But I don't know how to add redirection codes in IR.

> log.txt is not a satisfactory solution.

banach-space commented 2 years ago

Hi @LuoRongLuoRong , thanks for posting this! This is a generic LLVM question rather than something specific to llvm-tutor. I suggest posting on LLVM's https://discourse.llvm.org/ instead.

-Andrzej