diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2020-09-01 20:17:00 -0400 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2020-09-02 12:19:12 -0400 |
commit | d46f2c51e4c849683434bb5a0fb6164957474b8f (patch) | |
tree | 5527b673dfb301df693d4728f0d778b3c1846e67 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8ff44e644bb70dfb8decc397a42679df6e6f8ba1 (diff) | |
download | llvm-d46f2c51e4c849683434bb5a0fb6164957474b8f.zip llvm-d46f2c51e4c849683434bb5a0fb6164957474b8f.tar.gz llvm-d46f2c51e4c849683434bb5a0fb6164957474b8f.tar.bz2 |
Make -fvisibility-inlines-hidden apply to static local variables in inline functions on Darwin
This effectively disables r340386 on Darwin, and provides a command line flag
to opt into/out of this behaviour. This change is needed to compile certain
Apple headers correctly.
rdar://47688592
Differential revision: https://reviews.llvm.org/D86881
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 1cd392f..9143dd6 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2766,6 +2766,9 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, if (Args.hasArg(OPT_fvisibility_inlines_hidden)) Opts.InlineVisibilityHidden = 1; + if (Args.hasArg(OPT_fvisibility_inlines_hidden_static_local_var)) + Opts.VisibilityInlinesHiddenStaticLocalVar = 1; + if (Args.hasArg(OPT_fvisibility_global_new_delete_hidden)) Opts.GlobalAllocationFunctionVisibilityHidden = 1; |