[AST] Use -fvisibility value when ignoring -fv-i-h* inline static locals
Summary:
In r340386 we added code to give static locals in inline functions
default visibility. Instead, we should use the "default" visibility
passed on the command line, which could be hidden or protected, as GCC
does.
Some code bases use both -fvisibility=hidden and
-fvisibility-inlines-hidden to hide inline functions of classes that are
explicitly marked with default visibility.
Fixes PR39236
Reviewers: hans, thakis
Subscribers: eraman, llvm-commits
Differential Revision: https://reviews.llvm.org/D53052
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344190
91177308-0d34-0410-b5e6-
96231b3b80d8