r283932 - Pass the end of a component to SwiftAggLowering's enumerateComponents callback

Arnold Schwaighofer via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 11 13:34:03 PDT 2016


Author: arnolds
Date: Tue Oct 11 15:34:03 2016
New Revision: 283932

URL: http://llvm.org/viewvc/llvm-project?rev=283932&view=rev
Log:
Pass the end of a component to SwiftAggLowering's enumerateComponents callback

This is usefull for determining whether components overlap.

Modified:
    cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h
    cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp

Modified: cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h?rev=283932&r1=283931&r2=283932&view=diff
==============================================================================
--- cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h (original)
+++ cfe/trunk/include/clang/CodeGen/SwiftCallingConv.h Tue Oct 11 15:34:03 2016
@@ -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.
   ///

Modified: cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp?rev=283932&r1=283931&r2=283932&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp (original)
+++ cfe/trunk/lib/CodeGen/SwiftCallingConv.cpp Tue Oct 11 15:34:03 2016
@@ -506,7 +506,7 @@ void SwiftAggLowering::enumerateComponen
   assert(Finished && "haven't yet finished lowering");
 
   for (auto &entry : Entries) {
-    callback(entry.Begin, entry.Type);
+    callback(entry.Begin, entry.End, entry.Type);
   }
 }
 




More information about the cfe-commits mailing list