Add accessor for the LLVMContext.

llvm-svn: 174824
This commit is contained in:
Bill Wendling 2013-02-10 05:00:40 +00:00
parent 67ffb338ee
commit 5d020a3a31
2 changed files with 7 additions and 0 deletions

View 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;

View 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(),