summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-18 21:53:16 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-18 21:53:16 +0000
commit658d24d211e8f110ff35681605a5d4f65382bcb7 (patch)
tree5694e43730eb47df43ccb8d280a9d72c1787187d /llvm/lib/IR/Attributes.cpp
parent4f972ea2d86c995f80264a1c5b47ca87cc10184a (diff)
downloadbcm5719-llvm-658d24d211e8f110ff35681605a5d4f65382bcb7.tar.gz
bcm5719-llvm-658d24d211e8f110ff35681605a5d4f65382bcb7.zip
Use AttributeSet accessor methods instead of Attribute accessor methods.
Further encapsulation of the Attribute object. Don't allow direct access to the Attribute object as an aggregate. llvm-svn: 172853
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 173782e5a25..bb98358a0ab 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -660,6 +660,11 @@ bool AttributeSet::hasAttrSomewhere(Attribute::AttrKind Attr) const {
return false;
}
+AttributeSet AttributeSet::addRetAttributes(LLVMContext &C,
+ AttributeSet Attrs) const {
+ return addAttr(C, ReturnIndex, getAttributes(ReturnIndex));
+}
+
AttributeSet AttributeSet::addFnAttributes(LLVMContext &C,
AttributeSet Attrs) const {
return addAttr(C, FunctionIndex, getAttributes(FunctionIndex));
OpenPOWER on IntegriCloud