summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Writer
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-11-24 20:44:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-11-24 20:44:36 +0000
commitffbfcf29f24aa376f86203d3c34a9f0eb15d2086 (patch)
tree11e14b5be0b2fadbd2495a8643d9302e4f9fd56b /llvm/lib/Bitcode/Writer
parent3410466495cec1452dedc536ce81e062fe69f758 (diff)
downloadbcm5719-llvm-ffbfcf29f24aa376f86203d3c34a9f0eb15d2086.tar.gz
bcm5719-llvm-ffbfcf29f24aa376f86203d3c34a9f0eb15d2086.zip
Add and use Type::subtypes. NFC.
llvm-svn: 222682
Diffstat (limited to 'llvm/lib/Bitcode/Writer')
-rw-r--r--llvm/lib/Bitcode/Writer/ValueEnumerator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index f065c83ab89..6971d3aacd3 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -620,9 +620,8 @@ void ValueEnumerator::EnumerateType(Type *Ty) {
// Enumerate all of the subtypes before we enumerate this type. This ensures
// that the type will be enumerated in an order that can be directly built.
- for (Type::subtype_iterator I = Ty->subtype_begin(), E = Ty->subtype_end();
- I != E; ++I)
- EnumerateType(*I);
+ for (Type *SubTy : Ty->subtypes())
+ EnumerateType(SubTy);
// Refresh the TypeID pointer in case the table rehashed.
TypeID = &TypeMap[Ty];
OpenPOWER on IntegriCloud