mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #15473 from ikesyo/frontend-using-over-typedef
[gardening][Frontend] Replace `typedef` with `using`
This commit is contained in:
@@ -65,7 +65,7 @@ OutputFileMap::getOrCreateOutputMapForSingleOutput() {
|
||||
}
|
||||
|
||||
void OutputFileMap::dump(llvm::raw_ostream &os, bool Sort) const {
|
||||
typedef std::pair<file_types::ID, std::string> TypePathPair;
|
||||
using TypePathPair = std::pair<file_types::ID, std::string>;
|
||||
|
||||
auto printOutputPair = [&os](StringRef InputPath,
|
||||
const TypePathPair &OutputPair) -> void {
|
||||
@@ -74,7 +74,7 @@ void OutputFileMap::dump(llvm::raw_ostream &os, bool Sort) const {
|
||||
};
|
||||
|
||||
if (Sort) {
|
||||
typedef std::pair<StringRef, TypeToPathMap> PathMapPair;
|
||||
using PathMapPair = std::pair<StringRef, TypeToPathMap>;
|
||||
std::vector<PathMapPair> Maps;
|
||||
for (auto &InputPair : InputToOutputsMap) {
|
||||
Maps.emplace_back(InputPair.first(), InputPair.second);
|
||||
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
typedef SmallVector<uint64_t, 64> RecordData;
|
||||
typedef SmallVectorImpl<uint64_t> RecordDataImpl;
|
||||
using RecordData = SmallVector<uint64_t, 64>;
|
||||
using RecordDataImpl = SmallVectorImpl<uint64_t>;
|
||||
|
||||
struct SharedState : llvm::RefCountedBase<SharedState> {
|
||||
SharedState(StringRef serializedDiagnosticsPath)
|
||||
@@ -113,8 +113,8 @@ struct SharedState : llvm::RefCountedBase<SharedState> {
|
||||
/// \brief The collection of files used.
|
||||
llvm::DenseMap<const char *, unsigned> Files;
|
||||
|
||||
typedef llvm::DenseMap<const void *, std::pair<unsigned, StringRef> >
|
||||
DiagFlagsTy;
|
||||
using DiagFlagsTy =
|
||||
llvm::DenseMap<const void *, std::pair<unsigned, StringRef>>;
|
||||
|
||||
/// \brief Map for uniquing strings.
|
||||
DiagFlagsTy DiagFlags;
|
||||
@@ -560,4 +560,3 @@ void SerializedDiagnosticConsumer::handleDiagnostic(
|
||||
if (bracketDiagnostic)
|
||||
exitDiagBlock();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user