[llvm-branch-commits] [lld] r339658 - Merging r339049:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 14 01:59:57 PDT 2018


Author: hans
Date: Tue Aug 14 01:59:56 2018
New Revision: 339658

URL: http://llvm.org/viewvc/llvm-project?rev=339658&view=rev
Log:
Merging r339049:
------------------------------------------------------------------------
r339049 | mstorsjo | 2018-08-06 21:49:18 +0200 (Mon, 06 Aug 2018) | 8 lines

[COFF] Remove a superfluous warning about aligncomm for non-common symbols

It's not an error if a common symbol (uninitialized data, with alignment
specified via the aligncomm directive) is replaced with a regular
one with initialized data (with alignment specified via the section
chunk).

Differential Revision: https://reviews.llvm.org/D50268
------------------------------------------------------------------------

Added:
    lld/branches/release_70/test/COFF/Inputs/common-replacement.s
      - copied unchanged from r339049, lld/trunk/test/COFF/Inputs/common-replacement.s
    lld/branches/release_70/test/COFF/common-replacement.s
      - copied unchanged from r339049, lld/trunk/test/COFF/common-replacement.s
Modified:
    lld/branches/release_70/   (props changed)
    lld/branches/release_70/COFF/Driver.cpp

Propchange: lld/branches/release_70/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 14 01:59:56 2018
@@ -1 +1 @@
-/lld/trunk:338679,338684,338697,338699,339058,339075
+/lld/trunk:338679,338684,338697,338699,339049,339058,339075

Modified: lld/branches/release_70/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_70/COFF/Driver.cpp?rev=339658&r1=339657&r2=339658&view=diff
==============================================================================
--- lld/branches/release_70/COFF/Driver.cpp (original)
+++ lld/branches/release_70/COFF/Driver.cpp Tue Aug 14 01:59:56 2018
@@ -1551,11 +1551,11 @@ void LinkerDriver::link(ArrayRef<const c
       continue;
     }
 
+    // If the symbol isn't common, it must have been replaced with a regular
+    // symbol, which will carry its own alignment.
     auto *DC = dyn_cast<DefinedCommon>(Sym);
-    if (!DC) {
-      warn("/aligncomm symbol " + Name + " of wrong kind");
+    if (!DC)
       continue;
-    }
 
     CommonChunk *C = DC->getChunk();
     C->Alignment = std::max(C->Alignment, Alignment);




More information about the llvm-branch-commits mailing list