Skip to content

Commit cb7cf62

Browse files
committed
use std::make_unique rather than reset+new
1 parent 0a77699 commit cb7cf62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/DebugInfo/DWARF/DWARFContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,9 @@ DWARFContext::DWARFContext(std::unique_ptr<const DWARFObject> DObj,
735735
RecoverableErrorHandler(RecoverableErrorHandler),
736736
WarningHandler(WarningHandler), DObj(std::move(DObj)) {
737737
if (ThreadSafe)
738-
State.reset(new ThreadSafeState(*this, DWPName));
738+
State = std::make_unique<ThreadSafeState>(*this, DWPName);
739739
else
740-
State.reset(new ThreadUnsafeDWARFContextState(*this, DWPName));
740+
State = std::make_unique<ThreadUnsafeDWARFContextState>(*this, DWPName);
741741
}
742742

743743
DWARFContext::~DWARFContext() = default;

0 commit comments

Comments
 (0)