mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Convert a few methods to use ErrorOr.
It used to be inconvenient to mix ErrorOr and UniquePtr, but with c++11 they work OK together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -466,9 +466,9 @@ static void PrintFileSectionSizes(StringRef file) {
|
||||
for (MachOUniversalBinary::object_iterator I = UB->begin_objects(),
|
||||
E = UB->end_objects();
|
||||
I != E; ++I) {
|
||||
std::unique_ptr<ObjectFile> UO;
|
||||
ErrorOr<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile();
|
||||
std::unique_ptr<Archive> UA;
|
||||
if (!I->getAsObjectFile(UO)) {
|
||||
if (UO) {
|
||||
if (ObjectFile *o = dyn_cast<ObjectFile>(&*UO.get())) {
|
||||
MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
|
||||
if (OutputFormat == sysv)
|
||||
|
Reference in New Issue
Block a user