[dsymutil] Plug a memory leak.

llvm-svn: 248372
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index c45ff6a..fb7ffce 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -3157,7 +3157,7 @@
   // FIXME: At this point dsymutil should verify the DW_AT_gnu_dwo_id
   // against the module hash of the clang module.
 
-  CompileUnit *Unit = nullptr;
+  std::unique_ptr<CompileUnit> Unit;
 
   // Setup access to the debug info.
   DWARFContextInMemory DwarfContext(*ErrOrObj);
@@ -3172,7 +3172,7 @@
                << " 1 compile unit.\n";
         exitDsymutil(1);
       }
-      Unit = new CompileUnit(*CU, UnitID++, !Options.NoODR);
+      Unit = llvm::make_unique<CompileUnit>(*CU, UnitID++, !Options.NoODR);
       Unit->setHasInterestingContent();
       gatherDIEParents(CUDie, 0, *Unit, &ODRContexts.getRoot(), StringPool,
                        ODRContexts);