I have the following situation.
I need to insert certain CallInst in my code.
The prototype of my function is
void __llvmFooBar(int data, int loc);
The parameter loc is generated by the pass. I don't need any external data to generate that.
But, the parameter data is basically calculated by using some variable declared inside my C-code.
int k = 0;
void happyEnding(int k)
int __data = seed(time()) + k%2;
//callInst to be inserted here, it should be
std::vector<Value *> args(2);
args = ??? //need help here
args = ConstantInt::get(IntegerTy, getLoc());
In generic sense, how to make all variable with specific naming convention(like starts with __) make available to llvm pass ?
Can someone tell me how to proceed here ?