<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div>i want to insert add instruction in IR llvm format, instruction like x = x + 1 , 
where x is global variable , 
i try to use: 
GlobalVariable* x = new GlobalVariable(mod,Type::getInt32Ty(Context),false,GlobalValue::CommonLinkage,0,"xCounter");</div>

<div>Value one =  ConstantInt::get(Type::getInt32Ty(Context),1);
newInst = BinaryOperator::Create(Instruction::Add, , one ,"counter", insertPos);</div>

but an error occur, 
it is not accept type GlobalVariable, 
How can i define a global variable and set its value , and final i print its value on screen ?<br></div></body></html>