<div>Hi </div>
<div> </div>
<div>Apolagize if this newbie question has some obvious answer. When running something like</div>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr">
<div>...</div>
<div>ExprAST *Init = GlobalNames[i].second;</div>
<div>const Value *InitVal;</div>
<div>InitVal = Init->Codegen();</div>
<div>GlobalVariable * globvar = new GlobalVariable(*TheModule, InitVal->getType(), false, llvm::GlobalValue::ExternalLinkage, InitVal, Twine(GlobalName));</div>
<div>...</div></blockquote>
<div>I'm getting the following error</div>
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr">
<div>error: invalid conversion from `const llvm::Value*' to `llvm::Constant*'</div></blockquote>
<div>How may I make this conversion? Any help would be much appreciated!</div>
<div> </div>
<div>Anton</div>