1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[llvm-readobj] Convert to range-loops.

llvm-svn: 244300
This commit is contained in:
Davide Italiano 2015-08-07 00:35:28 +00:00
parent 28c3634e6a
commit 19ff587956
2 changed files with 4 additions and 6 deletions

View File

@ -1451,8 +1451,8 @@ void ELFDumper<ELFT>::printNeededLibraries() {
std::stable_sort(Libs.begin(), Libs.end());
for (LibsTy::const_iterator I = Libs.begin(), E = Libs.end(); I != E; ++I) {
outs() << " " << *I << "\n";
for (const auto &L : Libs) {
outs() << " " << L << "\n";
}
}

View File

@ -318,10 +318,8 @@ static void dumpObject(const ObjectFile *Obj) {
/// @brief Dumps each object file in \a Arc;
static void dumpArchive(const Archive *Arc) {
for (Archive::child_iterator ArcI = Arc->child_begin(),
ArcE = Arc->child_end();
ArcI != ArcE; ++ArcI) {
ErrorOr<std::unique_ptr<Binary>> ChildOrErr = ArcI->getAsBinary();
for (const auto &Child : Arc->children()) {
ErrorOr<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary();
if (std::error_code EC = ChildOrErr.getError()) {
// Ignore non-object files.
if (EC != object_error::invalid_file_type)