Add missing linkage predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-05-09 00:36:18 +00:00
parent 7e2946b4e8
commit 9834b9001c

View File

@ -135,8 +135,14 @@ public:
static bool isLinkOnceLinkage(LinkageTypes Linkage) {
return Linkage == LinkOnceAnyLinkage || Linkage == LinkOnceODRLinkage;
}
static bool isWeakAnyLinkage(LinkageTypes Linkage) {
return Linkage == WeakAnyLinkage;
}
static bool isWeakODRLinkage(LinkageTypes Linkage) {
return Linkage == WeakODRLinkage;
}
static bool isWeakLinkage(LinkageTypes Linkage) {
return Linkage == WeakAnyLinkage || Linkage == WeakODRLinkage;
return isWeakAnyLinkage(Linkage) || isWeakODRLinkage(Linkage);
}
static bool isAppendingLinkage(LinkageTypes Linkage) {
return Linkage == AppendingLinkage;
@ -192,6 +198,12 @@ public:
bool hasWeakLinkage() const {
return isWeakLinkage(Linkage);
}
bool hasWeakAnyLinkage() const {
return isWeakAnyLinkage(Linkage);
}
bool hasWeakODRLinkage() const {
return isWeakODRLinkage(Linkage);
}
bool hasAppendingLinkage() const { return isAppendingLinkage(Linkage); }
bool hasInternalLinkage() const { return isInternalLinkage(Linkage); }
bool hasPrivateLinkage() const { return isPrivateLinkage(Linkage); }