diff options
author | Piotr Padlewski <prazek@google.com> | 2015-07-28 16:10:58 +0000 |
---|---|---|
committer | Piotr Padlewski <prazek@google.com> | 2015-07-28 16:10:58 +0000 |
commit | 44b4ce8e9be5b7e3f24595689fa336ab08ce28c8 (patch) | |
tree | 6b788fabb59df1339c3b6f98413c9f6508c94823 /clang/lib/CodeGen/ItaniumCXXABI.cpp | |
parent | 51fd242cfccc8a3cd3bbe3212d5e9a15d355249a (diff) | |
download | bcm5719-llvm-44b4ce8e9be5b7e3f24595689fa336ab08ce28c8.tar.gz bcm5719-llvm-44b4ce8e9be5b7e3f24595689fa336ab08ce28c8.zip |
Getting rid of old iterator loops
llvm-svn: 243431
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index eb85413a5de..098b54a20f7 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -1043,25 +1043,25 @@ static CharUnits computeOffsetHint(ASTContext &Context, CharUnits Offset; // Now walk all possible inheritance paths. - for (CXXBasePaths::paths_iterator I = Paths.begin(), E = Paths.end(); I != E; - ++I) { - if (I->Access != AS_public) // Ignore non-public inheritance. + for (const CXXBasePath &Path : Paths) { + if (Path.Access != AS_public) // Ignore non-public inheritance. continue; ++NumPublicPaths; - for (CXXBasePath::iterator J = I->begin(), JE = I->end(); J != JE; ++J) { + for (const CXXBasePathElement &PathElement : Path) { // If the path contains a virtual base class we can't give any hint. // -1: no hint. - if (J->Base->isVirtual()) + if (PathElement.Base->isVirtual()) return CharUnits::fromQuantity(-1ULL); if (NumPublicPaths > 1) // Won't use offsets, skip computation. continue; // Accumulate the base class offsets. - const ASTRecordLayout &L = Context.getASTRecordLayout(J->Class); - Offset += L.getBaseClassOffset(J->Base->getType()->getAsCXXRecordDecl()); + const ASTRecordLayout &L = Context.getASTRecordLayout(PathElement.Class); + Offset += L.getBaseClassOffset( + PathElement.Base->getType()->getAsCXXRecordDecl()); } } |