From c5e90a8857549e4032b9a972cf74452ae12c6b25 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 10 Feb 2021 20:01:21 -0800 Subject: [AsmPrinter] Use range-based for loops (NFC) --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp') 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(Major, std::numeric_limits::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); -- cgit v1.1