]> granicus.if.org Git - llvm/commitdiff
[codeview] Update comment on aligning symbol records
authorReid Kleckner <rnk@google.com>
Tue, 18 Dec 2018 01:36:06 +0000 (01:36 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 18 Dec 2018 01:36:06 +0000 (01:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349433 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

index 78e5f5d215b3ff1a1be5b838c8d9775873a3a490..4132b1a30c42ab537812bf581792ae8b003e761b 100644 (file)
@@ -2831,8 +2831,10 @@ MCSymbol *CodeViewDebug::beginSymbolRecord(SymbolKind SymKind) {
 }
 
 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);
 }