diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-28 00:53:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-28 00:53:40 +0000 |
commit | a126f17ca83b985300c1f65cee647bea108db657 (patch) | |
tree | ca7e2d6e46767edd2166be7e1027190e7beacadb /lib/Sema/Sema.cpp | |
parent | 7e90985df09855dc309ed888a5b16a0ae684f8e3 (diff) |
Switch Sema::DynamicClasses over to LazyVector
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136317 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r-- | lib/Sema/Sema.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index b2f90613eb..e598956eeb 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -408,14 +408,15 @@ void Sema::ActOnEndOfTranslationUnit() { // If any dynamic classes have their key function defined within // this translation unit, then those vtables are considered "used" and must // be emitted. - for (unsigned I = 0, N = DynamicClasses.size(); I != N; ++I) { - assert(!DynamicClasses[I]->isDependentType() && + for (DynamicClassesType::iterator I = DynamicClasses.begin(ExternalSource), + E = DynamicClasses.end(); + I != E; ++I) { + assert(!(*I)->isDependentType() && "Should not see dependent types here!"); - if (const CXXMethodDecl *KeyFunction - = Context.getKeyFunction(DynamicClasses[I])) { + if (const CXXMethodDecl *KeyFunction = Context.getKeyFunction(*I)) { const FunctionDecl *Definition = 0; if (KeyFunction->hasBody(Definition)) - MarkVTableUsed(Definition->getLocation(), DynamicClasses[I], true); + MarkVTableUsed(Definition->getLocation(), *I, true); } } |