summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-13 15:41:46 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-13 15:41:46 +0000
commit574705ed7f80c59da543ad26d4a5fcd962b5c27d (patch)
treea2037e4203693828cbfd1f19000dc4199ff6204d /clang/lib/CodeGen/CGDebugInfo.cpp
parent48803e5ca9c07109c5de8b379c24f15d21b8c244 (diff)
downloadbcm5719-llvm-574705ed7f80c59da543ad26d4a5fcd962b5c27d.tar.gz
bcm5719-llvm-574705ed7f80c59da543ad26d4a5fcd962b5c27d.zip
[C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with iterator_range bases(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203803
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 97c947097ac..ebca5f8f108 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1172,15 +1172,14 @@ CollectCXXBases(const CXXRecordDecl *RD, llvm::DIFile Unit,
llvm::DIType RecordTy) {
const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
- for (CXXRecordDecl::base_class_const_iterator BI = RD->bases_begin(),
- BE = RD->bases_end(); BI != BE; ++BI) {
+ for (const auto &BI : RD->bases()) {
unsigned BFlags = 0;
uint64_t BaseOffset;
const CXXRecordDecl *Base =
- cast<CXXRecordDecl>(BI->getType()->getAs<RecordType>()->getDecl());
+ cast<CXXRecordDecl>(BI.getType()->getAs<RecordType>()->getDecl());
- if (BI->isVirtual()) {
+ if (BI.isVirtual()) {
// virtual base offset offset is -ve. The code generator emits dwarf
// expression where it expects +ve number.
BaseOffset =
@@ -1192,7 +1191,7 @@ CollectCXXBases(const CXXRecordDecl *RD, llvm::DIFile Unit,
// FIXME: Inconsistent units for BaseOffset. It is in bytes when
// BI->isVirtual() and bits when not.
- AccessSpecifier Access = BI->getAccessSpecifier();
+ AccessSpecifier Access = BI.getAccessSpecifier();
if (Access == clang::AS_private)
BFlags |= llvm::DIDescriptor::FlagPrivate;
else if (Access == clang::AS_protected)
@@ -1200,7 +1199,7 @@ CollectCXXBases(const CXXRecordDecl *RD, llvm::DIFile Unit,
llvm::DIType DTy =
DBuilder.createInheritance(RecordTy,
- getOrCreateType(BI->getType(), Unit),
+ getOrCreateType(BI.getType(), Unit),
BaseOffset, BFlags);
EltTys.push_back(DTy);
}
OpenPOWER on IntegriCloud