summaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 30730a4374a5..324e6f183334 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -1693,11 +1693,23 @@ unsigned AttributeList::getNumAttrSets() const {
}
void AttributeList::print(raw_ostream &O) const {
- O << "PAL[\n";
+ O << "AttributeList[\n";
for (unsigned i = index_begin(), e = index_end(); i != e; ++i) {
- if (getAttributes(i).hasAttributes())
- O << " { " << i << " => " << getAsString(i) << " }\n";
+ if (getAttributes(i).hasAttributes()) {
+ O << " { ";
+ switch (i) {
+ case AttrIndex::ReturnIndex:
+ O << "return";
+ break;
+ case AttrIndex::FunctionIndex:
+ O << "function";
+ break;
+ default:
+ O << "arg(" << i - AttrIndex::FirstArgIndex << ")";
+ }
+ O << " => " << getAsString(i) << " }\n";
+ }
}
O << "]\n";