================
@@ -143,18 +179,29 @@ class DarwinSDKInfo {
 
   DarwinSDKInfo(
       VersionTuple Version, VersionTuple MaximumDeploymentTarget,
-      llvm::Triple::OSType OS,
+      ArrayRef<SupportedPlatform> SupportedPlatforms =
----------------
cyndyishida wrote:

The only place I see this constructor class called, this parameter is 
`std::move` or constructed in place, so it seems unnecessary to expect 
ArrayRef, which usually implies a non-owned reference, where at call sites, 
ownership is transferred. 

If you just pass by value, using `std::move` should avoid expensive copies. Or 
you can do `SmallVector<SupportedPlatform>&&` to enforce that only 
`std::move`'ed or temporaries are accepted, to always avoid a copy. 

https://github.com/llvm/llvm-project/pull/171970
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to