зеркало из https://github.com/microsoft/clang.git
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:
Родитель
ba68b08a05
Коммит
3c15745b4b
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче