mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Use std::unique_ptr to make the ownership explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -260,12 +260,12 @@ bool DWARFUnit::parseDWO() {
|
||||
sys::path::append(AbsolutePath, CompilationDir);
|
||||
}
|
||||
sys::path::append(AbsolutePath, DWOFileName);
|
||||
ErrorOr<object::ObjectFile *> DWOFile =
|
||||
ErrorOr<std::unique_ptr<object::ObjectFile>> DWOFile =
|
||||
object::ObjectFile::createObjectFile(AbsolutePath);
|
||||
if (!DWOFile)
|
||||
return false;
|
||||
// Reset DWOHolder.
|
||||
DWO.reset(new DWOHolder(DWOFile.get()));
|
||||
DWO.reset(new DWOHolder(DWOFile.get().get()));
|
||||
DWARFUnit *DWOCU = DWO->getUnit();
|
||||
// Verify that compile unit in .dwo file is valid.
|
||||
if (!DWOCU || DWOCU->getDWOId() != getDWOId()) {
|
||||
|
Reference in New Issue
Block a user