Swift Calling Convention: add swiftself attribute.
Differential Revision: http://reviews.llvm.org/D17866
llvm-svn: 264754
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index 8c738ff..cff78c4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -89,6 +89,7 @@
IsByVal = CS->paramHasAttr(AttrIdx, Attribute::ByVal);
IsInAlloca = CS->paramHasAttr(AttrIdx, Attribute::InAlloca);
IsReturned = CS->paramHasAttr(AttrIdx, Attribute::Returned);
+ IsSwiftSelf = CS->paramHasAttr(AttrIdx, Attribute::SwiftSelf);
Alignment = CS->getParamAlignment(AttrIdx);
}
@@ -957,6 +958,8 @@
Flags.setInReg();
if (Arg.IsSRet)
Flags.setSRet();
+ if (Arg.IsSwiftSelf)
+ Flags.setSwiftSelf();
if (Arg.IsByVal)
Flags.setByVal();
if (Arg.IsInAlloca) {