mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Migrate llvm::make_unique to std::make_unique
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances in the swift repo.
This commit is contained in:
@@ -220,7 +220,7 @@ class StatsProfiler {
|
||||
if (I != Children.end()) {
|
||||
return I->getSecond().get();
|
||||
} else {
|
||||
auto N = llvm::make_unique<Node>(this);
|
||||
auto N = std::make_unique<Node>(this);
|
||||
auto P = N.get();
|
||||
Children.insert(std::make_pair(K, std::move(N)));
|
||||
return P;
|
||||
@@ -343,12 +343,12 @@ UnifiedStatsReporter::UnifiedStatsReporter(StringRef ProgramName,
|
||||
ProfileDirname(Directory),
|
||||
StartedTime(llvm::TimeRecord::getCurrentTime()),
|
||||
MainThreadID(std::this_thread::get_id()),
|
||||
Timer(make_unique<NamedRegionTimer>(AuxName,
|
||||
Timer(std::make_unique<NamedRegionTimer>(AuxName,
|
||||
"Building Target",
|
||||
ProgramName, "Running Program")),
|
||||
SourceMgr(SM),
|
||||
ClangSourceMgr(CSM),
|
||||
RecursiveTimers(llvm::make_unique<RecursionSafeTimers>())
|
||||
RecursiveTimers(std::make_unique<RecursionSafeTimers>())
|
||||
{
|
||||
path::append(StatsFilename, makeStatsFileName(ProgramName, AuxName));
|
||||
path::append(TraceFilename, makeTraceFileName(ProgramName, AuxName));
|
||||
@@ -360,9 +360,9 @@ UnifiedStatsReporter::UnifiedStatsReporter(StringRef ProgramName,
|
||||
if (TraceEvents)
|
||||
FrontendStatsEvents.emplace();
|
||||
if (ProfileEvents)
|
||||
EventProfilers = make_unique<StatsProfilers>();
|
||||
EventProfilers =std::make_unique<StatsProfilers>();
|
||||
if (ProfileEntities)
|
||||
EntityProfilers = make_unique<StatsProfilers>();
|
||||
EntityProfilers =std::make_unique<StatsProfilers>();
|
||||
}
|
||||
|
||||
void UnifiedStatsReporter::recordJobMaxRSS(long rss) {
|
||||
|
||||
Reference in New Issue
Block a user