mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[MachineOutliner] Reduce scope of variable and stop duplicate getMF() calls. NFCI.
This commit is contained in:
parent
4275ea1a33
commit
9827ef622e
@ -904,10 +904,10 @@ struct MachineOutliner : public ModulePass {
|
||||
/// Return a DISubprogram for OF if one exists, and null otherwise. Helper
|
||||
/// function for remark emission.
|
||||
DISubprogram *getSubprogramOrNull(const OutlinedFunction &OF) {
|
||||
DISubprogram *SP;
|
||||
for (const Candidate &C : OF.Candidates)
|
||||
if (C.getMF() && (SP = C.getMF()->getFunction().getSubprogram()))
|
||||
return SP;
|
||||
if (MachineFunction *MF = C.getMF())
|
||||
if (DISubprogram *SP = MF->getFunction().getSubprogram())
|
||||
return SP;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user