diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-11-16 22:25:03 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2016-11-16 22:25:03 +0000 |
commit | bd6ce9a2471756c29ae7a8e6c9d2377bdfd8c778 (patch) | |
tree | f777b7a6ee9bd8c48a5f08cde8a98463504f7b13 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 996961a4615e2ffaadc43a72e2c357f3352d2ae4 (diff) | |
download | llvm-bd6ce9a2471756c29ae7a8e6c9d2377bdfd8c778.zip llvm-bd6ce9a2471756c29ae7a8e6c9d2377bdfd8c778.tar.gz llvm-bd6ce9a2471756c29ae7a8e6c9d2377bdfd8c778.tar.bz2 |
[CodeGen] Pass references, not pointers, to MMI helpers. NFC.
While there, rename them to follow the coding style.
llvm-svn: 287169
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<FunctionType>(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<Function>( 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<GlobalValue>(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<GlobalValue>((*II)->stripPointerCasts())); - MMI.addFilterTypeInfo(MBB, FilterList); + MMI.addFilterTypeInfo(&MBB, FilterList); } } } |