[PATCH] D50268: [LLD] [COFF] Remove a superfluous warning about aligncomm for non-common symbols

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 3 13:08:38 PDT 2018


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, pcc, rnk.

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).


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D50268

Files:
  COFF/Driver.cpp


Index: COFF/Driver.cpp
===================================================================
--- COFF/Driver.cpp
+++ COFF/Driver.cpp
@@ -1425,10 +1425,8 @@
     }
 
     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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50268.159075.patch
Type: text/x-patch
Size: 419 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180803/1080f592/attachment.bin>


More information about the llvm-commits mailing list