Skip to content

Commit

Permalink
Be more specific about return type of MachOUniversalBinary::getObject…
Browse files Browse the repository at this point in the history
…ForArch

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220230 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
vonosmas committed Oct 20, 2014
1 parent 10051f0 commit 9170808
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions include/llvm/Object/MachOUniversal.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
namespace llvm {
namespace object {

class ObjectFile;

class MachOUniversalBinary : public Binary {
virtual void anchor();

Expand Down Expand Up @@ -58,7 +56,7 @@ class MachOUniversalBinary : public Binary {
return T.getArchName();
}

ErrorOr<std::unique_ptr<ObjectFile>> getAsObjectFile() const;
ErrorOr<std::unique_ptr<MachOObjectFile>> getAsObjectFile() const;

std::error_code getAsArchive(std::unique_ptr<Archive> &Result) const;
};
Expand Down Expand Up @@ -102,7 +100,7 @@ class MachOUniversalBinary : public Binary {
return V->isMachOUniversalBinary();
}

ErrorOr<std::unique_ptr<ObjectFile>>
ErrorOr<std::unique_ptr<MachOObjectFile>>
getObjectForArch(Triple::ArchType Arch) const;
};

Expand Down
4 changes: 2 additions & 2 deletions lib/Object/MachOUniversal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ MachOUniversalBinary::ObjectForArch::ObjectForArch(
}
}

ErrorOr<std::unique_ptr<ObjectFile>>
ErrorOr<std::unique_ptr<MachOObjectFile>>
MachOUniversalBinary::ObjectForArch::getAsObjectFile() const {
if (Parent) {
StringRef ParentData = Parent->getData();
Expand Down Expand Up @@ -139,7 +139,7 @@ static bool getCTMForArch(Triple::ArchType Arch, MachO::CPUType &CTM) {
}
}

ErrorOr<std::unique_ptr<ObjectFile>>
ErrorOr<std::unique_ptr<MachOObjectFile>>
MachOUniversalBinary::getObjectForArch(Triple::ArchType Arch) const {
MachO::CPUType CTM;
if (!getCTMForArch(Arch, CTM))
Expand Down

0 comments on commit 9170808

Please sign in to comment.