aboutsummaryrefslogtreecommitdiff
path: root/deps/lld/lib/Core/File.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-08-27 17:46:59 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-08-27 17:46:59 -0400
commit4794281d64b3482daf26a9bbfd2898a3a221b893 (patch)
tree54f6d3c7e3e6cb455d7c76d2d484ebe08685fb1a /deps/lld/lib/Core/File.cpp
parentebdc6b594ddc0762ed9e41b5f36e6da5e03c19e0 (diff)
downloadzig-4794281d64b3482daf26a9bbfd2898a3a221b893.tar.gz
zig-4794281d64b3482daf26a9bbfd2898a3a221b893.zip
embed LLD 5.0.0
This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the git monorepo.
Diffstat (limited to 'deps/lld/lib/Core/File.cpp')
-rw-r--r--deps/lld/lib/Core/File.cpp29
1 files changed, 29 insertions, 0 deletions
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 <mutex>
+
+namespace lld {
+
+File::~File() = default;
+
+File::AtomVector<DefinedAtom> File::_noDefinedAtoms;
+File::AtomVector<UndefinedAtom> File::_noUndefinedAtoms;
+File::AtomVector<SharedLibraryAtom> File::_noSharedLibraryAtoms;
+File::AtomVector<AbsoluteAtom> File::_noAbsoluteAtoms;
+
+std::error_code File::parse() {
+ std::lock_guard<std::mutex> lock(_parseMutex);
+ if (!_lastError.hasValue())
+ _lastError = doParse();
+ return _lastError.getValue();
+}
+
+} // end namespace lld