[llvm] r174824 - Add accessor for the LLVMContext.

Bill Wendling isanbard at gmail.com
Sat Feb 9 21:00:41 PST 2013


Author: void
Date: Sat Feb  9 23:00:40 2013
New Revision: 174824

URL: http://llvm.org/viewvc/llvm-project?rev=174824&view=rev
Log:
Add accessor for the LLVMContext.

Modified:
    llvm/trunk/include/llvm/IR/Attributes.h
    llvm/trunk/lib/IR/Attributes.cpp

Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=174824&r1=174823&r2=174824&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Sat Feb  9 23:00:40 2013
@@ -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;
 

Modified: llvm/trunk/lib/IR/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Attributes.cpp?rev=174824&r1=174823&r2=174824&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Attributes.cpp (original)
+++ llvm/trunk/lib/IR/Attributes.cpp Sat Feb  9 23:00:40 2013
@@ -709,6 +709,10 @@ AttributeSet AttributeSet::removeAttribu
 // AttributeSet Accessor Methods
 //===----------------------------------------------------------------------===//
 
+LLVMContext &AttributeSet::getContext() const {
+  return pImpl->getContext();
+}
+
 AttributeSet AttributeSet::getParamAttributes(unsigned Idx) const {
   return pImpl && hasAttributes(Idx) ?
     AttributeSet::get(pImpl->getContext(),





More information about the llvm-commits mailing list