mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[mips] Use range-based for loops. NFC.
llvm-svn: 263438
This commit is contained in:
parent
8ea7e842e3
commit
b93f6a836b
@ -387,11 +387,9 @@ static bool fixupFPReturnAndCall(Function &F, Module *M,
|
||||
bool Modified = false;
|
||||
LLVMContext &C = M->getContext();
|
||||
Type *MyVoid = Type::getVoidTy(C);
|
||||
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB)
|
||||
for (BasicBlock::iterator I = BB->begin(), E = BB->end();
|
||||
I != E; ++I) {
|
||||
Instruction &Inst = *I;
|
||||
if (const ReturnInst *RI = dyn_cast<ReturnInst>(I)) {
|
||||
for (auto &BB: F)
|
||||
for (auto &I: BB) {
|
||||
if (const ReturnInst *RI = dyn_cast<ReturnInst>(&I)) {
|
||||
Value *RVal = RI->getReturnValue();
|
||||
if (!RVal) continue;
|
||||
//
|
||||
@ -425,8 +423,8 @@ static bool fixupFPReturnAndCall(Function &F, Module *M,
|
||||
A = A.addAttribute(C, AttributeSet::FunctionIndex,
|
||||
Attribute::NoInline);
|
||||
Value *F = (M->getOrInsertFunction(Name, A, MyVoid, T, nullptr));
|
||||
CallInst::Create(F, Params, "", &Inst );
|
||||
} else if (const CallInst *CI = dyn_cast<CallInst>(I)) {
|
||||
CallInst::Create(F, Params, "", &I);
|
||||
} else if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
|
||||
FunctionType *FT = CI->getFunctionType();
|
||||
Function *F_ = CI->getCalledFunction();
|
||||
if (needsFPReturnHelper(*FT) &&
|
||||
|
Loading…
Reference in New Issue
Block a user