From ece8a53058b183aa0a669e21c57225431117089d Mon Sep 17 00:00:00 2001 From: patrick Date: Mon, 3 Aug 2020 14:32:29 +0000 Subject: Import LLVM 10.0.0 release including clang, lld and lldb. ok hackroom tested by plenty --- gnu/llvm/lld/lib/Core/File.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 gnu/llvm/lld/lib/Core/File.cpp (limited to 'gnu/llvm/lld/lib/Core/File.cpp') diff --git a/gnu/llvm/lld/lib/Core/File.cpp b/gnu/llvm/lld/lib/Core/File.cpp new file mode 100644 index 00000000000..ce33923c136 --- /dev/null +++ b/gnu/llvm/lld/lib/Core/File.cpp @@ -0,0 +1,28 @@ +//===- Core/File.cpp - A Container of Atoms -------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#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-59-g8ed1b