summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SwiftCallingConv.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:18:08 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:18:08 +0000
commitbab175ec4b075c8076ba14c762900392533f6ee4 (patch)
tree01f4f29419a2cb10abe13c1e63cd2a66068b0137 /lib/CodeGen/SwiftCallingConv.cpp
parent8b7a8012d223fac5d17d16a66bb39168a9a1dfc0 (diff)
Notes
Diffstat (limited to 'lib/CodeGen/SwiftCallingConv.cpp')
-rw-r--r--lib/CodeGen/SwiftCallingConv.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SwiftCallingConv.cpp b/lib/CodeGen/SwiftCallingConv.cpp
index 6c20f8c9d3e9..0bfe30a32c80 100644
--- a/lib/CodeGen/SwiftCallingConv.cpp
+++ b/lib/CodeGen/SwiftCallingConv.cpp
@@ -384,7 +384,7 @@ void SwiftAggLowering::splitVectorEntry(unsigned index) {
auto eltTy = split.first;
CharUnits eltSize = getTypeStoreSize(CGM, eltTy);
auto numElts = split.second;
- Entries.insert(&Entries[index + 1], numElts - 1, StorageEntry());
+ Entries.insert(Entries.begin() + index + 1, numElts - 1, StorageEntry());
CharUnits begin = Entries[index].Begin;
for (unsigned i = 0; i != numElts; ++i) {
@@ -506,7 +506,7 @@ void SwiftAggLowering::enumerateComponents(EnumerationCallback callback) const {
assert(Finished && "haven't yet finished lowering");
for (auto &entry : Entries) {
- callback(entry.Begin, entry.Type);
+ callback(entry.Begin, entry.End, entry.Type);
}
}
@@ -828,3 +828,8 @@ void swiftcall::computeABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI) {
argInfo.info = classifyArgumentType(CGM, argInfo.type);
}
}
+
+// Is swifterror lowered to a register by the target ABI.
+bool swiftcall::isSwiftErrorLoweredInRegister(CodeGenModule &CGM) {
+ return getSwiftABIInfo(CGM).isSwiftErrorInRegister();
+}