~ubuntu-branches/ubuntu/precise/llvm-3.2/precise-updates

« back to all changes in this revision

Viewing changes to lib/Transforms/IPO/ArgumentPromotion.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-12-04 09:00:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20121204090041-xyzk1pegyvd3ohmr
Tags: 3.2~rc2-1~exp1
New testing upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
611
611
  
612
612
  // Recompute the parameter attributes list based on the new arguments for
613
613
  // the function.
614
 
  NF->setAttributes(AttrListPtr::get(AttributesVec));
 
614
  NF->setAttributes(AttrListPtr::get(F->getContext(), AttributesVec));
615
615
  AttributesVec.clear();
616
616
 
617
617
  F->getParent()->getFunctionList().insert(F, NF);
731
731
      New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(),
732
732
                               Args, "", Call);
733
733
      cast<InvokeInst>(New)->setCallingConv(CS.getCallingConv());
734
 
      cast<InvokeInst>(New)->setAttributes(AttrListPtr::get(AttributesVec));
 
734
      cast<InvokeInst>(New)->setAttributes(AttrListPtr::get(II->getContext(),
 
735
                                                            AttributesVec));
735
736
    } else {
736
737
      New = CallInst::Create(NF, Args, "", Call);
737
738
      cast<CallInst>(New)->setCallingConv(CS.getCallingConv());
738
 
      cast<CallInst>(New)->setAttributes(AttrListPtr::get(AttributesVec));
 
739
      cast<CallInst>(New)->setAttributes(AttrListPtr::get(New->getContext(),
 
740
                                                          AttributesVec));
739
741
      if (cast<CallInst>(Call)->isTailCall())
740
742
        cast<CallInst>(New)->setTailCall();
741
743
    }