diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp index 37591d0f546..201d1f85b96 100644 --- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp @@ -928,9 +928,7 @@ bool MachOLinkingContext::customAtomOrderer(const DefinedAtom *left, static File *getFirstFile(const std::unique_ptr<InputElement> &elem) { FileNode *e = dyn_cast<FileNode>(const_cast<InputElement *>(elem.get())); - if (!e || e->files().empty()) - return nullptr; - return e->files()[0].get(); + return e ? e->getFile() : nullptr; } static bool isLibrary(const std::unique_ptr<InputElement> &elem) { |