Add support for printing out the attribute groups.

This emits the attribute groups that are used by the functions. (It currently
doesn't print out return type or parameter attributes within attribute groups.)

Note: The functions still retrieve their attributes from the "old" bitcode
format (using the deprecated 'Raw()' method). This means that string attributes
within an attribute group will not show up during a disassembly. This will be
addressed in a future commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174867 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-02-11 08:43:33 +00:00
parent 595ef3e314
commit b29ce26ea6
4 changed files with 90 additions and 19 deletions

View File

@@ -171,7 +171,7 @@ public:
/// \brief The Attribute is converted to a string of equivalent mnemonic. This
/// is, presumably, for writing out the mnemonics for the assembly writer.
std::string getAsString() const;
std::string getAsString(bool InAttrGrp = false) const;
/// \brief Equality and non-equality operators.
bool operator==(Attribute A) const { return pImpl == A.pImpl; }
@@ -317,7 +317,7 @@ public:
unsigned getStackAlignment(unsigned Index) const;
/// \brief Return the attributes at the index as a string.
std::string getAsString(unsigned Index) const;
std::string getAsString(unsigned Index, bool InAttrGrp = false) const;
typedef ArrayRef<Attribute>::iterator iterator;