diff options
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index ec5e554d4f5..62235af31cd 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -94,7 +94,7 @@ static void error(StringRef Filename, std::error_code EC) { } static void DumpObjectFile(ObjectFile &Obj, Twine Filename) { - std::unique_ptr<DIContext> DICtx(new DWARFContextInMemory(Obj)); + std::unique_ptr<DIContext> DICtx = DWARFContext::create(Obj); outs() << Filename.str() << ":\tfile format " << Obj.getFileFormatName() << "\n\n"; @@ -131,8 +131,8 @@ static void DumpInput(StringRef Filename) { } static bool VerifyObjectFile(ObjectFile &Obj, Twine Filename) { - std::unique_ptr<DIContext> DICtx(new DWARFContextInMemory(Obj)); - + std::unique_ptr<DIContext> DICtx = DWARFContext::create(Obj); + // Verify the DWARF and exit with non-zero exit status if verification // fails. raw_ostream &stream = Quiet ? nulls() : outs(); |