Commit 829dcd47 authored by Pawel Wodnicki's avatar Pawel Wodnicki
Browse files

Merging r168355: into the 3.2 release branch.

Update method calls to the new interface re r168354.

llvm-svn: 168487
parent 58b0a3b4
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2177,7 +2177,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
  unsigned CallingConv;
  CodeGen::AttributeListType AttributeList;
  CGM.ConstructAttributeList(CallInfo, TargetDecl, AttributeList, CallingConv);
  llvm::AttrListPtr Attrs = llvm::AttrListPtr::get(AttributeList);
  llvm::AttrListPtr Attrs = llvm::AttrListPtr::get(getLLVMContext(),
                                                   AttributeList);

  llvm::BasicBlock *InvokeDest = 0;
  if (!Attrs.getFnAttributes().hasAttribute(llvm::Attributes::NoUnwind))
+2 −2
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D,
  unsigned CallingConv;
  AttributeListType AttributeList;
  ConstructAttributeList(Info, D, AttributeList, CallingConv);
  F->setAttributes(llvm::AttrListPtr::get(AttributeList));
  F->setAttributes(llvm::AttrListPtr::get(getLLVMContext(), AttributeList));
  F->setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv));
}

@@ -1864,7 +1864,7 @@ static void ReplaceUsesOfNonProtoTypeWithRealFunction(llvm::GlobalValue *Old,
    ArgList.clear();
    if (!NewCall->getType()->isVoidTy())
      NewCall->takeName(CI);
    NewCall->setAttributes(llvm::AttrListPtr::get(AttrVec));
    NewCall->setAttributes(llvm::AttrListPtr::get(OldFn->getContext(), AttrVec));
    NewCall->setCallingConv(CI->getCallingConv());

    // Finally, remove the old call, replacing any uses with the new one.