[llvm] cb7cf62 - use std::make_unique rather than reset+new
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 15:16:52 PDT 2023
Author: David Blaikie
Date: 2023-10-04T22:16:45Z
New Revision: cb7cf626d26e50887828d466c0187907719824d4
URL: https://github.com/llvm/llvm-project/commit/cb7cf626d26e50887828d466c0187907719824d4
DIFF: https://github.com/llvm/llvm-project/commit/cb7cf626d26e50887828d466c0187907719824d4.diff
LOG: use std::make_unique rather than reset+new
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 1e1ab814673f423..5345f146c1d9e0d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -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;
More information about the llvm-commits
mailing list