From bd6ce9a2471756c29ae7a8e6c9d2377bdfd8c778 Mon Sep 17 00:00:00 2001 From: Ahmed Bougacha Date: Wed, 16 Nov 2016 22:25:03 +0000 Subject: [CodeGen] Pass references, not pointers, to MMI helpers. NFC. While there, rename them to follow the coding style. llvm-svn: 287169 --- llvm/lib/CodeGen/MachineModuleInfo.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp') diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 8efa07a..131ef44e 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -490,16 +490,16 @@ FunctionPass *createFreeMachineFunctionPass() { //===- MMI building helpers -----------------------------------------------===// -void llvm::ComputeUsesVAFloatArgument(const CallInst &I, - MachineModuleInfo *MMI) { +void llvm::computeUsesVAFloatArgument(const CallInst &I, + MachineModuleInfo &MMI) { FunctionType *FT = cast(I.getCalledValue()->getType()->getContainedType(0)); - if (FT->isVarArg() && !MMI->usesVAFloatArgument()) { + if (FT->isVarArg() && !MMI.usesVAFloatArgument()) { for (unsigned i = 0, e = I.getNumArgOperands(); i != e; ++i) { Type *T = I.getArgOperand(i)->getType(); for (auto i : post_order(T)) { if (i->isFloatingPointTy()) { - MMI->setUsesVAFloatArgument(true); + MMI.setUsesVAFloatArgument(true); return; } } @@ -507,14 +507,14 @@ void llvm::ComputeUsesVAFloatArgument(const CallInst &I, } } -void llvm::AddLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI, - MachineBasicBlock *MBB) { +void llvm::addLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI, + MachineBasicBlock &MBB) { if (const auto *PF = dyn_cast( I.getParent()->getParent()->getPersonalityFn()->stripPointerCasts())) MMI.addPersonality(PF); if (I.isCleanup()) - MMI.addCleanup(MBB); + MMI.addCleanup(&MBB); // FIXME: New EH - Add the clauses in reverse order. This isn't 100% correct, // but we need to do it this way because of how the DWARF EH emitter @@ -522,7 +522,7 @@ void llvm::AddLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI, for (unsigned i = I.getNumClauses(); i != 0; --i) { Value *Val = I.getClause(i - 1); if (I.isCatch(i - 1)) { - MMI.addCatchTypeInfo(MBB, + MMI.addCatchTypeInfo(&MBB, dyn_cast(Val->stripPointerCasts())); } else { // Add filters in a list. @@ -532,7 +532,7 @@ void llvm::AddLandingPadInfo(const LandingPadInst &I, MachineModuleInfo &MMI, II != IE; ++II) FilterList.push_back(cast((*II)->stripPointerCasts())); - MMI.addFilterTypeInfo(MBB, FilterList); + MMI.addFilterTypeInfo(&MBB, FilterList); } } } -- cgit v1.1