Merge pull request #15473 from ikesyo/frontend-using-over-typedef

[gardening][Frontend] Replace `typedef` with `using`
This commit is contained in:
Sho Ikeda
2018-03-26 08:57:42 +09:00
committed by GitHub
3 changed files with 7 additions and 8 deletions

View File

@@ -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);

View File

@@ -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();
}