1 //===- Core/File.cpp - A Container of Atoms -------------------------------===//
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lld/Core/File.h"
15 File::~File() = default;
17 File::AtomVector<DefinedAtom> File::_noDefinedAtoms;
18 File::AtomVector<UndefinedAtom> File::_noUndefinedAtoms;
19 File::AtomVector<SharedLibraryAtom> File::_noSharedLibraryAtoms;
20 File::AtomVector<AbsoluteAtom> File::_noAbsoluteAtoms;
22 std::error_code File::parse() {
23 std::lock_guard<std::mutex> lock(_parseMutex);
24 if (!_lastError.hasValue())
25 _lastError = doParse();
26 return _lastError.getValue();
29 } // end namespace lld