From f46262e0b7a183c22b9384cd729c5fb0f05e5d38 Mon Sep 17 00:00:00 2001 From: Manman Ren Date: Tue, 29 Mar 2016 17:37:21 +0000 Subject: Swift Calling Convention: add swiftself attribute. Differential Revision: http://reviews.llvm.org/D17866 llvm-svn: 264754 --- llvm/lib/IR/Attributes.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/lib/IR/Attributes.cpp') diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index f9d98eb2c49..7fb5bf1f42f 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -195,6 +195,8 @@ std::string Attribute::getAsString(bool InAttrGrp) const { return "byval"; if (hasAttribute(Attribute::Convergent)) return "convergent"; + if (hasAttribute(Attribute::SwiftSelf)) + return "swiftself"; if (hasAttribute(Attribute::InaccessibleMemOnly)) return "inaccessiblememonly"; if (hasAttribute(Attribute::InaccessibleMemOrArgMemOnly)) @@ -448,6 +450,7 @@ uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) { case Attribute::NoRecurse: return 1ULL << 48; case Attribute::InaccessibleMemOnly: return 1ULL << 49; case Attribute::InaccessibleMemOrArgMemOnly: return 1ULL << 50; + case Attribute::SwiftSelf: return 1ULL << 51; case Attribute::Dereferenceable: llvm_unreachable("dereferenceable attribute not supported in raw format"); break; -- cgit v1.2.3