X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FBitcode%2FWriter%2FValueEnumerator.cpp;h=6971d3aacd31afaa2bd61de9e3a3e1eea27b2dc5;hp=f065c83ab892471ae752fb6774be29b91ae2769e;hb=468d2fc5ca04bec1d186d6434652684e702a192b;hpb=d8e637eecfd9e7bbcf3b6a1f7d2c072f4ab9dea5 diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp index f065c83ab89..6971d3aacd3 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/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];