[PATCH] D16411: [ELF] Implemented -Bsymbolic-functions command line option

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 22 00:48:31 PST 2016


grimar added inline comments.

================
Comment at: ELF/OutputSections.cpp:1027-1030
@@ -1026,4 +1026,6 @@
   }
-  if (!Config->Shared)
+  if (!Config->Shared || Body->getVisibility() != STV_DEFAULT)
     return false;
-  return Body->getVisibility() == STV_DEFAULT;
+  if (Config->Bsymbolic || (Config->BsymbolicFunctions && Body->isFunction()))
+    return false;
+  return true;
----------------
ruiu wrote:
> The conditions inside these `if`s seem to be arbitrarily grouped into two. Probably it is a bit verbose but slightly better.
> 
>   if (!Config->Shared)
>     return false;
>   if (Body->getVisibility() != STV_DEFAULT)
>     return false;
>   if (Config->Bsymbolic)
>     return false;
>   if (Config->BsymbolicFunction && Body->isFunction())
>     return false;
>   return true;
I think we can group the last one, they are very close, what do you think ?
```
 if (Config->Bsymbolic || (Config->BsymbolicFunctions && Body->isFunction()))
    return false;
```



http://reviews.llvm.org/D16411





More information about the llvm-commits mailing list