Use static method in GlobalValue

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97872 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2010-03-06 07:35:18 +00:00
Родитель ba68b08a05
Коммит 3c15745b4b
1 изменённых файлов: 1 добавлений и 11 удалений

Просмотреть файл

@ -109,16 +109,6 @@ bool CodeGenModule::TryEmitBaseDestructorAsAlias(const CXXDestructorDecl *D) {
GlobalDecl(BaseD, Dtor_Base));
}
static bool isWeakForLinker(llvm::GlobalValue::LinkageTypes Linkage) {
return (Linkage == llvm::GlobalValue::AvailableExternallyLinkage ||
Linkage == llvm::GlobalValue::WeakAnyLinkage ||
Linkage == llvm::GlobalValue::WeakODRLinkage ||
Linkage == llvm::GlobalValue::LinkOnceAnyLinkage ||
Linkage == llvm::GlobalValue::LinkOnceODRLinkage ||
Linkage == llvm::GlobalValue::CommonLinkage ||
Linkage == llvm::GlobalValue::ExternalWeakLinkage);
}
/// Try to emit a definition as a global alias for another definition.
bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
GlobalDecl TargetDecl) {
@ -155,7 +145,7 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
llvm::GlobalValue::LinkageTypes TargetLinkage
= getFunctionLinkage(cast<FunctionDecl>(TargetDecl.getDecl()));
if (isWeakForLinker(TargetLinkage))
if (llvm::GlobalValue::isWeakForLinker(TargetLinkage))
return true;
// Derive the type for the alias.