IR: cleanup Module::dropReferences

This replaces some old-style loops with range-based for.

llvm-svn: 212278
This commit is contained in:
David Majnemer 2014-07-03 16:12:55 +00:00
parent 4efadfb0b0
commit 3374910f19
1 changed files with 6 additions and 6 deletions

View File

@ -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 {