diff options
author | Reed Kotler <rkotler@mips.com> | 2013-03-13 20:20:08 +0000 |
---|---|---|
committer | Reed Kotler <rkotler@mips.com> | 2013-03-13 20:20:08 +0000 |
commit | 9106f73246168fb30d26fb14085c0b3d81fcd350 (patch) | |
tree | 9754853200a2e8d629b468eff84d8600b70fb274 /lib/IR/Attributes.cpp | |
parent | 321aded62349b7369dc999a104944b5304199d83 (diff) |
Add some additonal attribute helper functions. Test will be on follow
up putback to clang for mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r-- | lib/IR/Attributes.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index ed2bf05e90..2d828914cd 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -649,6 +649,13 @@ AttributeSet AttributeSet::addAttribute(LLVMContext &C, unsigned Idx, return addAttributes(C, Idx, AttributeSet::get(C, Idx, Attr)); } +AttributeSet AttributeSet::addAttribute(LLVMContext &C, unsigned Idx, + StringRef Kind) const { + llvm::AttrBuilder B; + B.addAttribute(Kind); + return addAttributes(C, Idx, AttributeSet::get(C, Idx, B)); +} + AttributeSet AttributeSet::addAttributes(LLVMContext &C, unsigned Idx, AttributeSet Attrs) const { if (!pImpl) return Attrs; |