]> granicus.if.org Git - clang/commitdiff
Pass the end of a component to SwiftAggLowering's enumerateComponents callback
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 11 Oct 2016 20:34:03 +0000 (20:34 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 11 Oct 2016 20:34:03 +0000 (20:34 +0000)
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

include/clang/CodeGen/SwiftCallingConv.h
lib/CodeGen/SwiftCallingConv.cpp

index b6b8c476b14d80d4e6ccf61c4a1c4c3e37919983..dd0ae2f1d65060fa3333307ed601ce7f857b8562 100644 (file)
@@ -90,7 +90,7 @@ public:
   bool shouldPassIndirectly(bool asReturnValue) const;
 
   using EnumerationCallback =
-    llvm::function_ref<void(CharUnits offset, llvm::Type *type)>;
+    llvm::function_ref<void(CharUnits offset, CharUnits end, llvm::Type *type)>;
 
   /// Enumerate the expanded components of this type.
   ///
index 6c20f8c9d3e925da66a7227172f66938f7783f62..a79ddf94bc8992883e71bf86d4da107f52e00c57 100644 (file)
@@ -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);
   }
 }