[llvm-dev] Function return type does not match operand type of return inst!

Priyanka Bamne via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 15 01:08:23 PDT 2015

This is a verifier check.But i am not getting how to resolve this.Do i need
to change the function return type or some thing else.

ValueToValueMapTy VMap;
    BasicBlock *clonedBlock =CloneBasicBlock(bb, VMap, ".tr",
std::cout<<"clone done"<<"\n";
       TerminatorInst *merge_term=bb->getTerminator();
std::cout<<"got terminator"<<"\n";
  TerminatorInst *new_term=clonedBlock->getTerminator();
  errs()<<"new terminator instuction in perf:"<<*new_term<<"\n";
                  //Perform the ReMapping of Clonedinstructions
                  for (BasicBlock::iterator I = clonedBlock->begin(); I !=
clonedBlock->end(); ++I)
                      //Loop over all the operands of the instruction
                      for (unsigned op=0, E = I->getNumOperands(); op != E;
                          const Value *Op = I->getOperand(op);
                          //Get it out of the value map
                          Value *V = VMap[Op];
                          //If not in the value map, then its outside our
trace so ignore
                          if(V != 0)
std::cout<<"set terminator"<<"\n";

this is my pass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151015/d28a9fc4/attachment.html>

More information about the llvm-dev mailing list