forked from OSchip/llvm-project
Be more specific about return type of MachOUniversalBinary::getObjectForArch
llvm-svn: 220230
This commit is contained in:
parent
0a7c9d5831
commit
798ff92c3c
|
@ -25,8 +25,6 @@
|
|||
namespace llvm {
|
||||
namespace object {
|
||||
|
||||
class ObjectFile;
|
||||
|
||||
class MachOUniversalBinary : public Binary {
|
||||
virtual void anchor();
|
||||
|
||||
|
@ -58,7 +56,7 @@ public:
|
|||
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;
|
||||
};
|
||||
|
@ -102,7 +100,7 @@ public:
|
|||
return V->isMachOUniversalBinary();
|
||||
}
|
||||
|
||||
ErrorOr<std::unique_ptr<ObjectFile>>
|
||||
ErrorOr<std::unique_ptr<MachOObjectFile>>
|
||||
getObjectForArch(Triple::ArchType Arch) const;
|
||||
};
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue