Add a AttributeSetImpl::dump function.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Aug 2013 22:34:30 +0000 (22:34 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 2 Aug 2013 22:34:30 +0000 (22:34 +0000)
This is for the benefit of those of us with inferior debuggers which
do not permit member function calls on value types.

llvm-svn: 187685

llvm/lib/IR/AttributeImpl.h
llvm/lib/IR/Attributes.cpp

index 7bf9e8a..9da3f96 100644 (file)
@@ -258,6 +258,8 @@ public:
 
   // FIXME: This atrocity is temporary.
   uint64_t Raw(unsigned Index) const;
+
+  void dump() const;
 };
 
 } // end llvm namespace
index c483467..f466d16 100644 (file)
@@ -508,6 +508,10 @@ uint64_t AttributeSetImpl::Raw(unsigned Index) const {
   return 0;
 }
 
+void AttributeSetImpl::dump() const {
+  AttributeSet(const_cast<AttributeSetImpl *>(this)).dump();
+}
+
 //===----------------------------------------------------------------------===//
 // AttributeSet Construction and Mutation Methods
 //===----------------------------------------------------------------------===//