summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/IR/Attributes.h3
-rw-r--r--lib/IR/Attributes.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h
index a5539cc..38f4ed9 100644
--- a/include/llvm/IR/Attributes.h
+++ b/include/llvm/IR/Attributes.h
@@ -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;
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index 99fafae..04e95ef 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -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(),