Make the type signature more strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171434 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index ecdb928..2633608 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -45,7 +45,7 @@
bool contains(Attribute::AttrKind Kind) const;
bool contains(StringRef Kind) const;
- bool hasAttribute(uint64_t A) const;
+ bool hasAttribute(Attribute::AttrKind A) const;
bool hasAttributes() const;
bool hasAttributes(const Attribute &A) const;
@@ -69,7 +69,7 @@
uint64_t getBitMask() const; // FIXME: Remove.
- static uint64_t getAttrMask(uint64_t Val);
+ static uint64_t getAttrMask(Attribute::AttrKind Val);
void Profile(FoldingSetNodeID &ID) const {
Profile(ID, Data, Vals);
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index 2e0b084..b847d76 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -359,7 +359,7 @@
return cast<ConstantInt>(Data)->getZExtValue();
}
-uint64_t AttributeImpl::getAttrMask(uint64_t Val) {
+uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) {
switch (Val) {
case Attribute::None: return 0;
case Attribute::ZExt: return 1 << 0;
@@ -395,7 +395,7 @@
llvm_unreachable("Unsupported attribute type");
}
-bool AttributeImpl::hasAttribute(uint64_t A) const {
+bool AttributeImpl::hasAttribute(Attribute::AttrKind A) const {
return (getBitMask() & getAttrMask(A)) != 0;
}