Add a dereferenceable attribute
[oota-llvm.git] / lib / IR / AttributeImpl.h
index 999a803c037c1ca70809c1d5668f4671309a5358..cc6d557ab4c7d1c6568705afab874dc0b92f5dd2 100644 (file)
@@ -116,7 +116,8 @@ public:
   IntAttributeImpl(Attribute::AttrKind Kind, uint64_t Val)
       : EnumAttributeImpl(IntAttrEntry, Kind), Val(Val) {
     assert(
-        (Kind == Attribute::Alignment || Kind == Attribute::StackAlignment) &&
+        (Kind == Attribute::Alignment || Kind == Attribute::StackAlignment ||
+         Kind == Attribute::Dereferenceable) &&
         "Wrong kind for int attribute!");
   }
 
@@ -164,6 +165,7 @@ public:
 
   unsigned getAlignment() const;
   unsigned getStackAlignment() const;
+  uint64_t getDereferenceableBytes() const;
   std::string getAsString(bool InAttrGrp) const;
 
   typedef const Attribute *iterator;