diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-27 14:14:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-05-27 14:14:42 +0000 |
commit | b97e89691d359457a5f25add6dc79229703c8296 (patch) | |
tree | 96f5a7b302304025aabdefab75321f2700518377 /clang/lib/AST/Decl.cpp | |
parent | cca5f562dbafb497dc405a6d11a1164003325e0d (diff) | |
download | bcm5719-llvm-b97e89691d359457a5f25add6dc79229703c8296.tar.gz bcm5719-llvm-b97e89691d359457a5f25add6dc79229703c8296.zip |
Move 3 helper function to Linkage.h
This removes a duplicate from Decl.cpp and a followup patch will use
isExternallyVisible.
llvm-svn: 182735
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index fd0f7251376..5e0ffdacf09 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -495,10 +495,6 @@ static bool isSingleLineExternC(const Decl &D) { return false; } -static bool isExternalLinkage(Linkage L) { - return L == UniqueExternalLinkage || L == ExternalLinkage; -} - static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, LVComputationKind computation) { assert(D->getDeclContext()->getRedeclContext()->isFileContext() && @@ -722,7 +718,7 @@ static LinkageInfo getLVForNamespaceScopeDecl(const NamedDecl *D, } else if (isa<EnumConstantDecl>(D)) { LinkageInfo EnumLV = getLVForDecl(cast<NamedDecl>(D->getDeclContext()), computation); - if (!isExternalLinkage(EnumLV.getLinkage())) + if (!isExternalFormalLinkage(EnumLV.getLinkage())) return LinkageInfo::none(); LV.merge(EnumLV); @@ -793,7 +789,7 @@ static LinkageInfo getLVForClassMember(const NamedDecl *D, LinkageInfo classLV = getLVForDecl(cast<RecordDecl>(D->getDeclContext()), classComputation); - if (!isExternalLinkage(classLV.getLinkage())) + if (!isExternalFormalLinkage(classLV.getLinkage())) return LinkageInfo::none(); // If the class already has unique-external linkage, we can't improve. |