mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Improve swift::TransformRange enough to delete TransformArrayRef
We have a lot of "transform a range" types already: llvm::mapped_iterator, swift::TransformRange and swift::TransformIterator, and swift::ArrayRefView for static transformations. This gets rid of one more layer without losing any real functionality.
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
|
||||
#include "swift/Basic/LLVM.h"
|
||||
#include "swift/Basic/STLExtras.h"
|
||||
#include "swift/Basic/TransformArrayRef.h"
|
||||
|
||||
namespace swift {
|
||||
|
||||
@@ -31,10 +30,11 @@ class SILPhiArgument;
|
||||
class SILFunctionArgument;
|
||||
|
||||
using PhiArgumentArrayRef =
|
||||
TransformArrayRef<function_ref<SILPhiArgument *(SILArgument *)>>;
|
||||
TransformRange<ArrayRef<SILArgument *>, SILPhiArgument *(*)(SILArgument *)>;
|
||||
|
||||
using FunctionArgumentArrayRef =
|
||||
TransformArrayRef<function_ref<SILFunctionArgument *(SILArgument *)>>;
|
||||
TransformRange<ArrayRef<SILArgument *>,
|
||||
SILFunctionArgument *(*)(SILArgument *)>;
|
||||
|
||||
} // namespace swift
|
||||
|
||||
|
||||
Reference in New Issue
Block a user