[PATCH] D56868: Add -f[no-]set-visibility-for-decls

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 17 11:33:37 PST 2019


scott.linder created this revision.
scott.linder added a reviewer: rjmccall.
Herald added subscribers: llvm-commits, nhaehnle, jvesely.

Introduce an option to request global visibility settings be applied to declarations without a definition or an explicit visibility, rather than the existing behavior of giving these default visibility. When the visibility of all or most extern definitions are known this allows for the same optimisations `-fvisibility` permits without updating source code to annotate all declarations.


Repository:
  rL LLVM

https://reviews.llvm.org/D56868

Files:
  docs/ClangCommandLineReference.rst
  include/clang/Basic/LangOptions.def
  include/clang/Driver/Options.td
  lib/CodeGen/CodeGenModule.cpp
  lib/Driver/ToolChains/AMDGPU.cpp
  lib/Driver/ToolChains/Clang.cpp
  lib/Driver/ToolChains/HIP.cpp
  lib/Frontend/CompilerInvocation.cpp
  test/CodeGen/set-visibility-for-decls.c
  test/Driver/amdgpu-visibility.cl
  test/Driver/clang_f_opts.c
  test/Driver/hip-toolchain-no-rdc.hip
  test/Driver/hip-toolchain-rdc.hip

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56868.182357.patch
Type: text/x-patch
Size: 13222 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190117/4aeda88c/attachment.bin>


More information about the llvm-commits mailing list