Add some accessor and query methods for retrieving Attribute objects and such.
[oota-llvm.git] / lib / IR / AttributeImpl.h
index 7bb1fccba0a6cac92c95c039a70fab1fc61c3937..cb2c55ccbe78931ebc15aef74c0063b467cf9701 100644 (file)
@@ -170,8 +170,12 @@ public:
   static AttributeSetNode *get(LLVMContext &C, ArrayRef<Attribute> Attrs);
 
   bool hasAttribute(Attribute::AttrKind Kind) const;
+  bool hasAttribute(StringRef Kind) const;
   bool hasAttributes() const { return !AttrList.empty(); }
 
+  Attribute getAttribute(Attribute::AttrKind Kind) const;
+  Attribute getAttribute(StringRef Kind) const;
+
   unsigned getAlignment() const;
   unsigned getStackAlignment() const;
   std::string getAsString(bool InAttrGrp) const;