From 1baf38f5a6edfbaa402f1dbda9dfa30fe02d5163 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 26 Mar 2011 12:10:19 +0000 Subject: 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 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') 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()) + if (RD->getExplicitVisibility()) return; switch (RD->getTemplateSpecializationKind()) { -- cgit v1.1