diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-07-03 16:12:55 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-07-03 16:12:55 +0000 |
commit | 3374910f1908b522f8f0ba7798e0e7f634d46588 (patch) | |
tree | 54aa47273703d3c48e4bf3f817862586619c138c /llvm/lib/IR/Module.cpp | |
parent | 4efadfb0b0ec545d0ef609c5eeb6a0342d0e56e4 (diff) | |
download | llvm-3374910f1908b522f8f0ba7798e0e7f634d46588.zip llvm-3374910f1908b522f8f0ba7798e0e7f634d46588.tar.gz llvm-3374910f1908b522f8f0ba7798e0e7f634d46588.tar.bz2 |
IR: cleanup Module::dropReferences
This replaces some old-style loops with range-based for.
llvm-svn: 212278
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index d853bf4..f1b1f9a 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -437,14 +437,14 @@ std::error_code Module::materializeAllPermanently(bool ReleaseBuffer) { // has "dropped all references", except operator delete. // void Module::dropAllReferences() { - for(Module::iterator I = begin(), E = end(); I != E; ++I) - I->dropAllReferences(); + for (Function &F : *this) + F.dropAllReferences(); - for(Module::global_iterator I = global_begin(), E = global_end(); I != E; ++I) - I->dropAllReferences(); + for (GlobalVariable &GV : globals()) + GV.dropAllReferences(); - for(Module::alias_iterator I = alias_begin(), E = alias_end(); I != E; ++I) - I->dropAllReferences(); + for (GlobalAlias &GA : aliases()) + GA.dropAllReferences(); } unsigned Module::getDwarfVersion() const { |