@@ -193,7 +193,7 @@ static T &getAccelTable(std::unique_ptr<T> &Cache, const DWARFObject &Obj,
193
193
return *Cache;
194
194
DWARFDataExtractor AccelSection (Obj, Section, IsLittleEndian, 0 );
195
195
DataExtractor StrData (StringSection, IsLittleEndian, 0 );
196
- Cache. reset ( new T (AccelSection, StrData) );
196
+ Cache = std::make_unique<T> (AccelSection, StrData);
197
197
if (Error E = Cache->extract ())
198
198
llvm::consumeError (std::move (E));
199
199
return *Cache;
@@ -377,23 +377,23 @@ class ThreadUnsafeDWARFContextState : public DWARFContext::DWARFContextState {
377
377
? DWARFDataExtractor (DObj, DObj.getLocSection (), D.isLittleEndian (),
378
378
D.getUnitAtIndex (0 )->getAddressByteSize ())
379
379
: DWARFDataExtractor (" " , D.isLittleEndian (), 0 );
380
- Loc. reset ( new DWARFDebugLoc (std::move (Data) ));
380
+ Loc = std::make_unique< DWARFDebugLoc> (std::move (Data));
381
381
return Loc.get ();
382
382
}
383
383
384
384
const DWARFDebugAranges *getDebugAranges () override {
385
385
if (Aranges)
386
386
return Aranges.get ();
387
387
388
- Aranges. reset ( new DWARFDebugAranges () );
388
+ Aranges = std::make_unique< DWARFDebugAranges>( );
389
389
Aranges->generate (&D);
390
390
return Aranges.get ();
391
391
}
392
392
393
393
Expected<const DWARFDebugLine::LineTable *>
394
394
getLineTableForUnit (DWARFUnit *U, function_ref<void (Error)> RecoverableErrorHandler) override {
395
395
if (!Line)
396
- Line. reset ( new DWARFDebugLine);
396
+ Line = std::make_unique< DWARFDebugLine>( );
397
397
398
398
auto UnitDIE = U->getUnitDIE ();
399
399
if (!UnitDIE)
0 commit comments