diff options
author | Kazu Hirata <kazu@google.com> | 2021-11-18 09:09:52 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-11-18 09:09:52 -0800 |
commit | 7ca14f6044bfa46efdbb4d4080e36c3265a09a78 (patch) | |
tree | 6fc08bc40f8f67dc5fd74e71109edd1d0bf764e7 /llvm/lib/Bitcode | |
parent | 7796d81ae8204289c6ea07f19e538cf287d3213f (diff) | |
download | llvm-7ca14f6044bfa46efdbb4d4080e36c3265a09a78.zip llvm-7ca14f6044bfa46efdbb4d4080e36c3265a09a78.tar.gz llvm-7ca14f6044bfa46efdbb4d4080e36c3265a09a78.tar.bz2 |
[llvm] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/Bitcode')
-rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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; |