Skip to content

Commit eaf33e0

Browse files
committed
[gardening][lib/Basic] Replace typedef with using
1 parent 54b28b6 commit eaf33e0

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

lib/Basic/Mangler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ void Mangle::printManglingStats() {
9090
}
9191

9292
llvm::outs() << "Mangling operator stats:\n";
93-
94-
typedef llvm::StringMapEntry<OpStatEntry> MapEntry;
93+
94+
using MapEntry = llvm::StringMapEntry<OpStatEntry>;
9595
std::vector<const MapEntry *> SortedOpStats;
9696
for (const MapEntry &ME : OpStats) {
9797
SortedOpStats.push_back(&ME);

lib/Basic/Statistic.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ class UnifiedStatsReporter::RecursionSafeTimers {
172172
class StatsProfiler {
173173
struct Node {
174174
int64_t SelfCount;
175-
typedef std::tuple<StringRef,
176-
const void*,
177-
const UnifiedStatsReporter::TraceFormatter*> Key;
175+
using Key = std::tuple<StringRef, const void *,
176+
const UnifiedStatsReporter::TraceFormatter *>;
178177
Node *Parent;
179178
DenseMap<Key, std::unique_ptr<Node>> Children;
180179

lib/Basic/StringExtras.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,7 @@ static bool isVacuousPreposition(StringRef beforePreposition,
994994
}
995995

996996
namespace {
997-
typedef std::reverse_iterator<camel_case::WordIterator> ReverseWordIterator;
997+
using ReverseWordIterator = std::reverse_iterator<camel_case::WordIterator>;
998998
} // end anonymous namespace
999999

10001000
/// Find the last preposition in the given word.

lib/Basic/TaskQueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void DummyTaskQueue::addTask(const char *ExecPath, ArrayRef<const char *> Args,
5151
bool DummyTaskQueue::execute(TaskQueue::TaskBeganCallback Began,
5252
TaskQueue::TaskFinishedCallback Finished,
5353
TaskQueue::TaskSignalledCallback Signalled) {
54-
typedef std::pair<ProcessId, std::unique_ptr<DummyTask>> PidTaskPair;
54+
using PidTaskPair = std::pair<ProcessId, std::unique_ptr<DummyTask>>;
5555
std::queue<PidTaskPair> ExecutingTasks;
5656

5757
bool SubtaskFailed = false;

lib/Basic/Unix/TaskQueue.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ void TaskQueue::addTask(const char *ExecPath, ArrayRef<const char *> Args,
308308

309309
bool TaskQueue::execute(TaskBeganCallback Began, TaskFinishedCallback Finished,
310310
TaskSignalledCallback Signalled) {
311-
typedef llvm::DenseMap<pid_t, std::unique_ptr<Task>> PidToTaskMap;
311+
using PidToTaskMap = llvm::DenseMap<pid_t, std::unique_ptr<Task>>;
312312

313313
// Stores the current executing Tasks, organized by pid.
314314
PidToTaskMap ExecutingTasks;

0 commit comments

Comments
 (0)