[PATCH] D85745: emit int32 for each version part

Xun Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 11:47:14 PDT 2020


lxfind updated this revision to Diff 284835.
lxfind added a comment.

Address comments


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85745/new/

https://reviews.llvm.org/D85745

Files:
  llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp


Index: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -790,8 +790,8 @@
   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 Part : FrontVer.Part)
+    OS.emitInt32(Part);
 
   // 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
@@ -803,8 +803,8 @@
   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 Part : BackVer.Part)
+    OS.emitInt32(Part);
 
   OS.AddComment("Null-terminated compiler version string");
   emitNullTerminatedSymbolName(OS, CompilerVersion);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85745.284835.patch
Type: text/x-patch
Size: 1080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200811/5369c1dc/attachment.bin>


More information about the llvm-commits mailing list