[llvm] r349433 - [codeview] Update comment on aligning symbol records

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 17 17:36:07 PST 2018


Author: rnk
Date: Mon Dec 17 17:36:06 2018
New Revision: 349433

URL: http://llvm.org/viewvc/llvm-project?rev=349433&view=rev
Log:
[codeview] Update comment on aligning symbol records

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=349433&r1=349432&r2=349433&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Mon Dec 17 17:36:06 2018
@@ -2831,8 +2831,10 @@ MCSymbol *CodeViewDebug::beginSymbolReco
 }
 
 void CodeViewDebug::endSymbolRecord(MCSymbol *SymEnd) {
-  // Symbol records in object files are not aligned, although we are considering
-  // it for linker performance reasons.
+  // MSVC does not pad out symbol records to four bytes, but LLVM does to avoid
+  // an extra copy of every symbol record in LLD. This increases object file
+  // size by less than 1% in the clang build, and is compatible with the Visual
+  // C++ linker.
   OS.EmitValueToAlignment(4);
   OS.EmitLabel(SymEnd);
 }




More information about the llvm-commits mailing list