aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp11
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);
}
}