diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-31 20:59:05 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-31 20:59:05 +0000 |
commit | 14292a6be51ab57ff425ff263d4134fe46d082c4 (patch) | |
tree | 979145ca073962db3a59de9efab1cdb69db4b7ba /lib/IR/AttributeImpl.h | |
parent | b62fb4ba5cf61070486287da393ada566b4ad4ed (diff) | |
download | external_llvm-14292a6be51ab57ff425ff263d4134fe46d082c4.zip external_llvm-14292a6be51ab57ff425ff263d4134fe46d082c4.tar.gz external_llvm-14292a6be51ab57ff425ff263d4134fe46d082c4.tar.bz2 |
Add support for emitting a string attribute.
Attributes that are strings are typically target-dependent attributes. They are
of this form in the IR:
"attr"
"attr" = "val"
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r-- | lib/IR/AttributeImpl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h index af9d4fa..442860d 100644 --- a/lib/IR/AttributeImpl.h +++ b/lib/IR/AttributeImpl.h @@ -45,23 +45,24 @@ public: ArrayRef<Constant*> values); AttributeImpl(LLVMContext &C, StringRef data); + LLVMContext &getContext() { return Context; } + bool hasAttribute(Attribute::AttrKind A) const; Constant *getAttributeKind() const { return Kind; } ArrayRef<Constant*> getAttributeValues() const { return Vals; } - LLVMContext &getContext() { return Context; } - ArrayRef<Constant*> getValues() const { return Vals; } - uint64_t getAlignment() const; uint64_t getStackAlignment() const; + /// \brief Equality and non-equality comparison operators. bool operator==(Attribute::AttrKind Kind) const; bool operator!=(Attribute::AttrKind Kind) const; bool operator==(StringRef Kind) const; bool operator!=(StringRef Kind) const; + /// \brief Used when sorting the attributes. bool operator<(const AttributeImpl &AI) const; void Profile(FoldingSetNodeID &ID) const { |