From 7ca14f6044bfa46efdbb4d4080e36c3265a09a78 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 18 Nov 2021 09:09:52 -0800 Subject: [llvm] Use range-based for loops (NFC) --- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp') diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index fd77a8c..1e9a919 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -973,9 +973,8 @@ void ModuleBitcodeWriter::writeTypeTable() { // STRUCT: [ispacked, eltty x N] TypeVals.push_back(ST->isPacked()); // Output all of the element types. - for (StructType::element_iterator I = ST->element_begin(), - E = ST->element_end(); I != E; ++I) - TypeVals.push_back(VE.getTypeID(*I)); + for (Type *ET : ST->elements()) + TypeVals.push_back(VE.getTypeID(ET)); if (ST->isLiteral()) { Code = bitc::TYPE_CODE_STRUCT_ANON; -- cgit v1.1