Make the type signature more strict.

llvm-svn: 171434
This commit is contained in:
Bill Wendling 2013-01-03 00:46:43 +00:00
parent 33accdf602
commit 0793f4501c
2 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ public:
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 @@ public:
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);

View File

@ -359,7 +359,7 @@ uint64_t AttributeImpl::getBitMask() const {
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 @@ uint64_t AttributeImpl::getAttrMask(uint64_t Val) {
llvm_unreachable("Unsupported attribute type");
}
bool AttributeImpl::hasAttribute(uint64_t A) const {
bool AttributeImpl::hasAttribute(Attribute::AttrKind A) const {
return (getBitMask() & getAttrMask(A)) != 0;
}