diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-03-26 12:10:19 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-03-26 12:10:19 +0000 |
commit | 1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163 (patch) | |
tree | 7d76db523a10e3129396b86ecaf8198bca494d01 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 34d00052cbfd6747026f77128950de4462803d65 (diff) | |
download | llvm-1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163.zip llvm-1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163.tar.gz llvm-1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163.tar.bz2 |
On Mac OS X, the presence of an 'availability' attribute for that
platform implies default visibility. To achieve these, refactor our
lookup of explicit visibility so that we search for both an explicit
VisibilityAttr and an appropriate AvailabilityAttr, favoring the
VisibilityAttr if it is present.
llvm-svn: 128336
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 156819c..d180a22 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -224,7 +224,7 @@ void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, return; // Don't override an explicit visibility attribute. - if (RD->hasAttr<VisibilityAttr>()) + if (RD->getExplicitVisibility()) return; switch (RD->getTemplateSpecializationKind()) { |