diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp index cd5d64697d..7752cf79a2 100644 --- a/lib/CodeGen/CGCXX.cpp +++ b/lib/CodeGen/CGCXX.cpp @@ -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(TargetDecl.getDecl())); - if (isWeakForLinker(TargetLinkage)) + if (llvm::GlobalValue::isWeakForLinker(TargetLinkage)) return true; // Derive the type for the alias.