]> granicus.if.org Git - clang/commit
Add -fapply-global-visibility-to-externs for -cc1
authorScott Linder <scott@scottlinder.com>
Mon, 28 Jan 2019 17:12:19 +0000 (17:12 +0000)
committerScott Linder <scott@scottlinder.com>
Mon, 28 Jan 2019 17:12:19 +0000 (17:12 +0000)
commite68bc49943ebc9e3fb7452a9e0ac13998bbbd443
tree44edf15453651036cc2c78b43bfbe08a6bea0693
parentd58879f85687fa30cafb3d377bbf05a6929a8032
Add -fapply-global-visibility-to-externs for -cc1

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.

Differential Revision: https://reviews.llvm.org/D56868

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352391 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/LangOptions.def
include/clang/Driver/CC1Options.td
lib/CodeGen/CodeGenModule.cpp
lib/Driver/ToolChains/AMDGPU.cpp
lib/Driver/ToolChains/HIP.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/set-visibility-for-decls.c [new file with mode: 0644]
test/Driver/amdgpu-visibility.cl
test/Driver/hip-toolchain-no-rdc.hip
test/Driver/hip-toolchain-rdc.hip