[llvm-commits] [llvm] r171434 - in /llvm/trunk/lib/IR: AttributeImpl.h Attributes.cpp
Bill Wendling
isanbard at gmail.com
Wed Jan 2 16:46:44 PST 2013
Author: void
Date: Wed Jan 2 18:46:43 2013
New Revision: 171434
URL: http://llvm.org/viewvc/llvm-project?rev=171434&view=rev
Log:
Make the type signature more strict.
Modified:
llvm/trunk/lib/IR/AttributeImpl.h
llvm/trunk/lib/IR/Attributes.cpp
Modified: llvm/trunk/lib/IR/AttributeImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/AttributeImpl.h?rev=171434&r1=171433&r2=171434&view=diff
==============================================================================
--- llvm/trunk/lib/IR/AttributeImpl.h (original)
+++ llvm/trunk/lib/IR/AttributeImpl.h Wed Jan 2 18:46:43 2013
@@ -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);
Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=171434&r1=171433&r2=171434&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Wed Jan 2 18:46:43 2013
@@ -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;
}
More information about the llvm-commits
mailing list