[PATCH] D17998: [ELF] implement --warn-common/--no-warn-common

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 11:20:10 PST 2016


grimar added inline comments.

================
Comment at: ELF/Symbols.cpp:145-152
@@ -144,2 +144,10 @@
     return 1;
+
+  if (Config->WarnCommon) {
+    if (isCommon() != Other->isCommon())
+      warning("common " + this->getName() + " is overridden");
+    else if (isCommon())
+      warning("multiple common of " + this->getName());
+  }
+
   if (isCommon()) {
----------------
ruiu wrote:
> I wouldn't add new code to this function. Instead, please try to make this a new function or refactor this function to make it shorter.
My version of refactor is here: http://reviews.llvm.org/D18004


http://reviews.llvm.org/D17998





More information about the llvm-commits mailing list