aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2016-03-29 17:37:21 +0000
committerManman Ren <manman.ren@gmail.com>2016-03-29 17:37:21 +0000
commitf46262e0b7a183c22b9384cd729c5fb0f05e5d38 (patch)
treea4c3cb4390adf67c3341875e7734d38230204150 /llvm/lib/IR/Function.cpp
parent6e5c1fed08edf57725b9dc2e5c7ab429d25569a6 (diff)
downloadllvm-f46262e0b7a183c22b9384cd729c5fb0f05e5d38.zip
llvm-f46262e0b7a183c22b9384cd729c5fb0f05e5d38.tar.gz
llvm-f46262e0b7a183c22b9384cd729c5fb0f05e5d38.tar.bz2
Swift Calling Convention: add swiftself attribute.
Differential Revision: http://reviews.llvm.org/D17866 llvm-svn: 264754
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 3ecf386..5efde82 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -92,6 +92,11 @@ bool Argument::hasByValAttr() const {
return hasAttribute(Attribute::ByVal);
}
+bool Argument::hasSwiftSelfAttr() const {
+ return getParent()->getAttributes().
+ hasAttribute(getArgNo()+1, Attribute::SwiftSelf);
+}
+
/// \brief Return true if this argument has the inalloca attribute on it in
/// its containing function.
bool Argument::hasInAllocaAttr() const {