diff options
author | Kazu Hirata <kazu@google.com> | 2021-02-10 20:01:21 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-02-10 20:01:22 -0800 |
commit | c5e90a8857549e4032b9a972cf74452ae12c6b25 (patch) | |
tree | 81b875718927c7f336cb9b3451a764bcd3e40f2c /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | b16c6b2a83d9ba94cde7cc03dfea932077442859 (diff) | |
download | llvm-c5e90a8857549e4032b9a972cf74452ae12c6b25.zip llvm-c5e90a8857549e4032b9a972cf74452ae12c6b25.tar.gz llvm-c5e90a8857549e4032b9a972cf74452ae12c6b25.tar.bz2 |
[AsmPrinter] Use range-based for loops (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index a0e699e..d77864c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -814,8 +814,8 @@ void CodeViewDebug::emitCompilerInformation() { StringRef CompilerVersion = CU->getProducer(); Version FrontVer = parseVersion(CompilerVersion); OS.AddComment("Frontend version"); - for (int N = 0; N < 4; ++N) - OS.emitInt16(FrontVer.Part[N]); + for (int N : FrontVer.Part) + OS.emitInt16(N); // Some Microsoft tools, like Binscope, expect a backend version number of at // least 8.something, so we'll coerce the LLVM version into a form that @@ -827,8 +827,8 @@ void CodeViewDebug::emitCompilerInformation() { Major = std::min<int>(Major, std::numeric_limits<uint16_t>::max()); Version BackVer = {{ Major, 0, 0, 0 }}; OS.AddComment("Backend version"); - for (int N = 0; N < 4; ++N) - OS.emitInt16(BackVer.Part[N]); + for (int N : BackVer.Part) + OS.emitInt16(N); OS.AddComment("Null-terminated compiler version string"); emitNullTerminatedSymbolName(OS, CompilerVersion); |