Make the type signature more strict.
authorBill Wendling <isanbard@gmail.com>
Thu, 3 Jan 2013 00:46:43 +0000 (00:46 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 3 Jan 2013 00:46:43 +0000 (00:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171434 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/AttributeImpl.h
lib/IR/Attributes.cpp

index ecdb9280ced2f22969f77753b537fc1b13f1612f..2633608926fbc5b3bdbb75a770f99fdfe1f34370 100644 (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);
index 2e0b084ab59cd62bc526c48edf2f4dbb80d48e3b..b847d768f3a3f7ad07cdec280194b776508f5f91 100644 (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;
 }