summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-03-08 18:45:14 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-03-08 18:45:14 +0000
commit23a6dcb365f5c6a9b803e9ab08088c67e2e55780 (patch)
tree00673f5d3476b95f4ce1691dbc32ba36c063bb4a /clang/lib/CodeGen
parent951b235be21c7dad91f5036f330560a9a0807c17 (diff)
downloadbcm5719-llvm-23a6dcb365f5c6a9b803e9ab08088c67e2e55780.tar.gz
bcm5719-llvm-23a6dcb365f5c6a9b803e9ab08088c67e2e55780.zip
[C++11] Replacing EnumDecl iterators enumerator_begin() and enumerator_end() with iterator_range enumerators(). Updating all of the usages of the iterators with range-based for loops.
llvm-svn: 203353
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index d115f264ba7..4e7e223ca0d 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1917,9 +1917,7 @@ llvm::DIType CGDebugInfo::CreateEnumType(const EnumType *Ty) {
// Create DIEnumerator elements for each enumerator.
SmallVector<llvm::Value *, 16> Enumerators;
ED = ED->getDefinition();
- for (EnumDecl::enumerator_iterator
- Enum = ED->enumerator_begin(), EnumEnd = ED->enumerator_end();
- Enum != EnumEnd; ++Enum) {
+ for (const auto *Enum : ED->enumerators()) {
Enumerators.push_back(
DBuilder.createEnumerator(Enum->getName(),
Enum->getInitVal().getSExtValue()));
OpenPOWER on IntegriCloud