Skip to content

Commit

Permalink
use std::make_unique rather than reset+new
Browse files Browse the repository at this point in the history
  • Loading branch information
dwblaikie committed Oct 4, 2023
1 parent 0a77699 commit cb7cf62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,9 +735,9 @@ DWARFContext::DWARFContext(std::unique_ptr<const DWARFObject> DObj,
RecoverableErrorHandler(RecoverableErrorHandler),
WarningHandler(WarningHandler), DObj(std::move(DObj)) {
if (ThreadSafe)
State.reset(new ThreadSafeState(*this, DWPName));
State = std::make_unique<ThreadSafeState>(*this, DWPName);
else
State.reset(new ThreadUnsafeDWARFContextState(*this, DWPName));
State = std::make_unique<ThreadUnsafeDWARFContextState>(*this, DWPName);
}

DWARFContext::~DWARFContext() = default;
Expand Down

0 comments on commit cb7cf62

Please sign in to comment.