summaryrefslogtreecommitdiff
path: root/lib/DebugInfo
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-01-22 00:14:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-01-22 00:14:49 +0000
commit825fc31bd3a6e7604c4b69f28f32e90b5a882289 (patch)
tree2026366f101c87f4560963d62ecc0138540f31f9 /lib/DebugInfo
parent6220c8f960fe287efcfc27f46ab6ad48e5b3c5d2 (diff)
Change createObjectFile to return an ErrorOr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r--lib/DebugInfo/DWARFUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/DebugInfo/DWARFUnit.cpp b/lib/DebugInfo/DWARFUnit.cpp
index 5167eb947c4..732fb82e73e 100644
--- a/lib/DebugInfo/DWARFUnit.cpp
+++ b/lib/DebugInfo/DWARFUnit.cpp
@@ -263,12 +263,12 @@ bool DWARFUnit::parseDWO() {
sys::path::append(AbsolutePath, CompilationDir);
}
sys::path::append(AbsolutePath, DWOFileName);
- object::ObjectFile *DWOFile =
+ ErrorOr<object::ObjectFile *> DWOFile =
object::ObjectFile::createObjectFile(AbsolutePath);
if (!DWOFile)
return false;
// Reset DWOHolder.
- DWO.reset(new DWOHolder(DWOFile));
+ DWO.reset(new DWOHolder(DWOFile.get()));
DWARFUnit *DWOCU = DWO->getUnit();
// Verify that compile unit in .dwo file is valid.
if (DWOCU == 0 || DWOCU->getDWOId() != getDWOId()) {