From: Arnold Schwaighofer Date: Tue, 11 Oct 2016 20:34:03 +0000 (+0000) Subject: Pass the end of a component to SwiftAggLowering's enumerateComponents callback X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ceb94e6d115bc8cce548b3d76f1fcf24f23421e6;p=clang Pass the end of a component to SwiftAggLowering's enumerateComponents callback This is usefull for determining whether components overlap. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283932 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/CodeGen/SwiftCallingConv.h b/include/clang/CodeGen/SwiftCallingConv.h index b6b8c476b1..dd0ae2f1d6 100644 --- a/include/clang/CodeGen/SwiftCallingConv.h +++ b/include/clang/CodeGen/SwiftCallingConv.h @@ -90,7 +90,7 @@ public: bool shouldPassIndirectly(bool asReturnValue) const; using EnumerationCallback = - llvm::function_ref; + llvm::function_ref; /// Enumerate the expanded components of this type. /// diff --git a/lib/CodeGen/SwiftCallingConv.cpp b/lib/CodeGen/SwiftCallingConv.cpp index 6c20f8c9d3..a79ddf94bc 100644 --- a/lib/CodeGen/SwiftCallingConv.cpp +++ b/lib/CodeGen/SwiftCallingConv.cpp @@ -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); } }