[PATCH] D85745: emit int32 for each version part

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


lxfind created this revision.
lxfind added reviewers: wenlei, amccarth, MaskRay.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
lxfind requested review of this revision.

The Version struct is defined with 4 int values. There is no reason we shouldn't use emitInt32 here. This gives more flexibility (e.g. if you use an internal sub-version that happens to be big)


Repository:
  rG LLVM Github Monorepo

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
@@ -791,7 +791,7 @@
   Version FrontVer = parseVersion(CompilerVersion);
   OS.AddComment("Frontend version");
   for (int N = 0; N < 4; ++N)
-    OS.emitInt16(FrontVer.Part[N]);
+    OS.emitInt32(FrontVer.Part[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


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


More information about the llvm-commits mailing list