[LLVMdev] Instruction does not dominate all uses! <badref> ??
edA-qa mort-ora-y
eda-qa at disemia.com
Fri Nov 2 04:09:06 PDT 2012
On 02/11/12 11:55, Duncan Sands wrote:
> Looks like you forgot to add the call instruction to EntryBlock.
> ^ Didn't add it to a basic block.
I forget to past that part. This is how I add it to a block:
auto f = llvm::cast<llvm::Function>( module->getOrInsertFunction(
"eval_expr",
llvm::Type::getInt32Ty( *context ), (llvm::Type*)0 ) );
auto bb = llvm::BasicBlock::Create( *context, "EntryBlock", f );
llvm::IRBuilder<true,llvm::NoFolder> builder( bb );
builder.CreateRet( expr_i_showed_before );
return f;
Or do I have to create another block to do the calls?
--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121102/e9ee54dd/attachment.sig>
More information about the llvm-dev
mailing list