Browse Source

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
Arnold Schwaighofer 8 years ago
parent
commit
ceb94e6d11
2 changed files with 2 additions and 2 deletions
  1. 1 1
      include/clang/CodeGen/SwiftCallingConv.h
  2. 1 1
      lib/CodeGen/SwiftCallingConv.cpp

+ 1 - 1
include/clang/CodeGen/SwiftCallingConv.h

@@ -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.
   ///

+ 1 - 1
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);
   }
 }