From 4794281d64b3482daf26a9bbfd2898a3a221b893 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 27 Aug 2017 17:46:59 -0400 Subject: embed LLD 5.0.0 This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the git monorepo. --- deps/lld/lib/Core/File.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 deps/lld/lib/Core/File.cpp (limited to 'deps/lld/lib/Core/File.cpp') diff --git a/deps/lld/lib/Core/File.cpp b/deps/lld/lib/Core/File.cpp new file mode 100644 index 0000000000..30ded091a9 --- /dev/null +++ b/deps/lld/lib/Core/File.cpp @@ -0,0 +1,29 @@ +//===- Core/File.cpp - A Container of Atoms -------------------------------===// +// +// The LLVM Linker +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lld/Core/File.h" +#include + +namespace lld { + +File::~File() = default; + +File::AtomVector File::_noDefinedAtoms; +File::AtomVector File::_noUndefinedAtoms; +File::AtomVector File::_noSharedLibraryAtoms; +File::AtomVector File::_noAbsoluteAtoms; + +std::error_code File::parse() { + std::lock_guard lock(_parseMutex); + if (!_lastError.hasValue()) + _lastError = doParse(); + return _lastError.getValue(); +} + +} // end namespace lld -- cgit v1.2.3