Add accessor for the LLVMContext.
authorBill Wendling <isanbard@gmail.com>
Sun, 10 Feb 2013 05:00:40 +0000 (05:00 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 10 Feb 2013 05:00:40 +0000 (05:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174824 91177308-0d34-0410-b5e6-96231b3b80d8

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

index a5539cc713bfeada07c911abd4dcb9be0c98234b..38f4ed983e6ad8f6eb6707b0f8129ac9731712da 100644 (file)
@@ -286,6 +286,9 @@ public:
   // AttributeSet Accessors
   //===--------------------------------------------------------------------===//
 
+  /// \brief Retrieve the LLVM context.
+  LLVMContext &getContext() const;
+
   /// \brief The attributes for the specified index are returned.
   AttributeSet getParamAttributes(unsigned Idx) const;
 
index 99fafae88e88bbb91fed8ea37f340f2d229e3414..04e95ef6b097dfeae06bd840e51469d88b062400 100644 (file)
@@ -709,6 +709,10 @@ AttributeSet AttributeSet::removeAttributes(LLVMContext &C, unsigned Idx,
 // AttributeSet Accessor Methods
 //===----------------------------------------------------------------------===//
 
+LLVMContext &AttributeSet::getContext() const {
+  return pImpl->getContext();
+}
+
 AttributeSet AttributeSet::getParamAttributes(unsigned Idx) const {
   return pImpl && hasAttributes(Idx) ?
     AttributeSet::get(pImpl->getContext(),