From a8fbdab8501f0470da8bf414d52473749aaf8c24 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 27 Feb 2013 02:15:29 +0000 Subject: Move LinkageInfo out of NamedDecl so that it can be used in Type.h. Everything that cares about visibility also cares about linkage, so I just moved it to Visibility.h instead of creating a new .h. llvm-svn: 176155 --- clang/lib/CodeGen/CodeGenModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 22aeee9..cdb41a7 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -276,7 +276,7 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, } // Set visibility for definitions. - NamedDecl::LinkageInfo LV = D->getLinkageAndVisibility(); + LinkageInfo LV = D->getLinkageAndVisibility(); if (LV.visibilityExplicit() || !GV->hasAvailableExternallyLinkage()) GV->setVisibility(GetLLVMVisibility(LV.visibility())); } @@ -693,7 +693,7 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, } else { F->setLinkage(llvm::Function::ExternalLinkage); - NamedDecl::LinkageInfo LV = FD->getLinkageAndVisibility(); + LinkageInfo LV = FD->getLinkageAndVisibility(); if (LV.linkage() == ExternalLinkage && LV.visibilityExplicit()) { F->setVisibility(GetLLVMVisibility(LV.visibility())); } @@ -1433,7 +1433,7 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, GV->setConstant(isTypeConstant(D->getType(), false)); // Set linkage and visibility in case we never see a definition. - NamedDecl::LinkageInfo LV = D->getLinkageAndVisibility(); + LinkageInfo LV = D->getLinkageAndVisibility(); if (LV.linkage() != ExternalLinkage) { // Don't set internal linkage on declarations. } else { -- cgit v1.1