]> granicus.if.org Git - clang/commit
[AST] Use -fvisibility value when ignoring -fv-i-h* inline static locals
authorReid Kleckner <rnk@google.com>
Wed, 10 Oct 2018 21:59:56 +0000 (21:59 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 10 Oct 2018 21:59:56 +0000 (21:59 +0000)
commitb6756678e3559c1304735550e28479a6289c4e52
tree643e8032223939a4a8fd04e625136766aef8e964
parent73e11ddc10f9839e267a72bd5a4153ed5b3eb052
[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
lib/AST/Decl.cpp
test/CodeGenCXX/visibility-inlines-hidden-staticvar.cpp