[llvm] r208379 - Add missing linkage predicates.
Rafael Espindola
rafael.espindola at gmail.com
Thu May 8 17:36:18 PDT 2014
Author: rafael
Date: Thu May 8 19:36:18 2014
New Revision: 208379
URL: http://llvm.org/viewvc/llvm-project?rev=208379&view=rev
Log:
Add missing linkage predicates.
Modified:
llvm/trunk/include/llvm/IR/GlobalValue.h
Modified: llvm/trunk/include/llvm/IR/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GlobalValue.h?rev=208379&r1=208378&r2=208379&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/IR/GlobalValue.h Thu May 8 19:36:18 2014
@@ -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); }
More information about the llvm-commits
mailing list