diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-04-16 12:43:07 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-04-16 12:43:07 +0000 |
commit | 90a84a33f61aeb025a69cabf5658008c67280248 (patch) | |
tree | ab043741584d5d01b2ce5b85b85aea5c5951d033 | |
parent | a98f6897a24cb087b0875c729a6d5f1d637689fc (diff) | |
download | bcm5719-llvm-90a84a33f61aeb025a69cabf5658008c67280248.tar.gz bcm5719-llvm-90a84a33f61aeb025a69cabf5658008c67280248.zip |
Make it obvious that we're iterating over a range of pointers.
Found by -Wrange-loop-analysis.
llvm-svn: 235090
-rw-r--r-- | llvm/include/llvm/Analysis/RegionInfoImpl.h | 2 | ||||
-rw-r--r-- | llvm/lib/Target/CppBackend/CPPBackend.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/Analysis/RegionInfoImpl.h b/llvm/include/llvm/Analysis/RegionInfoImpl.h index 1f48d046720..b31eefc15f7 100644 --- a/llvm/include/llvm/Analysis/RegionInfoImpl.h +++ b/llvm/include/llvm/Analysis/RegionInfoImpl.h @@ -487,7 +487,7 @@ void RegionBase<Tr>::print(raw_ostream &OS, bool print_tree, unsigned level, OS.indent(level * 2 + 2); if (Style == PrintBB) { - for (const auto &BB : blocks()) + for (const auto *BB : blocks()) OS << BB->getName() << ", "; // TODO: remove the last "," } else if (Style == PrintRN) { for (const_element_iterator I = element_begin(), E = element_end(); diff --git a/llvm/lib/Target/CppBackend/CPPBackend.cpp b/llvm/lib/Target/CppBackend/CPPBackend.cpp index 0cb0beac8c1..f1a7127e8fd 100644 --- a/llvm/lib/Target/CppBackend/CPPBackend.cpp +++ b/llvm/lib/Target/CppBackend/CPPBackend.cpp @@ -1724,7 +1724,7 @@ void CppWriter::printFunctionUses(const Function* F) { // initializers. if (GenerationType != GenFunction) { nl(Out) << "// Global Variable Definitions"; nl(Out); - for (const auto &GV : gvs) { + for (auto *GV : gvs) { if (GlobalVariable *Var = dyn_cast<GlobalVariable>(GV)) printVariableBody(Var); } |