llvm.org GIT mirror llvm / 5fd4b41
Use for range loops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208348 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
1 changed file(s) with 9 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
16891689
16901690 // Print the function declarations for any functions encountered
16911691 nl(Out) << "// Function Declarations"; nl(Out);
1692 for (SmallPtrSet::iterator I = gvs.begin(), E = gvs.end();
1693 I != E; ++I) {
1694 if (Function* Fun = dyn_cast(*I)) {
1692 for (auto *GV : gvs) {
1693 if (Function *Fun = dyn_cast(GV)) {
16951694 if (!is_inline || Fun != F)
16961695 printFunctionHead(Fun);
16971696 }
16991698
17001699 // Print the global variable declarations for any variables encountered
17011700 nl(Out) << "// Global Variable Declarations"; nl(Out);
1702 for (SmallPtrSet::iterator I = gvs.begin(), E = gvs.end();
1703 I != E; ++I) {
1704 if (GlobalVariable* F = dyn_cast(*I))
1701 for (auto *GV : gvs) {
1702 if (GlobalVariable *F = dyn_cast(GV))
17051703 printVariableHead(F);
17061704 }
17071705
17081706 // Print the constants found
17091707 nl(Out) << "// Constant Definitions"; nl(Out);
1710 for (SmallPtrSet::iterator I = consts.begin(),
1711 E = consts.end(); I != E; ++I) {
1712 printConstant(*I);
1708 for (const auto *C : consts) {
1709 printConstant(C);
17131710 }
17141711
17151712 // Process the global variables definitions now that all the constants have
17171714 // initializers.
17181715 if (GenerationType != GenFunction) {
17191716 nl(Out) << "// Global Variable Definitions"; nl(Out);
1720 for (SmallPtrSet::iterator I = gvs.begin(), E = gvs.end();
1721 I != E; ++I) {
1722 if (GlobalVariable* GV = dyn_cast(*I))
1723 printVariableBody(GV);
1717 for (const auto &GV : gvs) {
1718 if (GlobalVariable *Var = dyn_cast(GV))
1719 printVariableBody(Var);
17241720 }
17251721 }
17261722 }