Coverage Report

Created: 2017-09-19 22:28

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/tools/lld/lib/Core/File.cpp
Line
Count
Source
1
//===- Core/File.cpp - A Container of Atoms -------------------------------===//
2
//
3
//                             The LLVM Linker
4
//
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
7
//
8
//===----------------------------------------------------------------------===//
9
10
#include "lld/Core/File.h"
11
#include <mutex>
12
13
namespace lld {
14
15
1.32k
File::~File() = default;
16
17
File::AtomVector<DefinedAtom> File::_noDefinedAtoms;
18
File::AtomVector<UndefinedAtom> File::_noUndefinedAtoms;
19
File::AtomVector<SharedLibraryAtom> File::_noSharedLibraryAtoms;
20
File::AtomVector<AbsoluteAtom> File::_noAbsoluteAtoms;
21
22
1.07k
std::error_code File::parse() {
23
1.07k
  std::lock_guard<std::mutex> lock(_parseMutex);
24
1.07k
  if (!_lastError.hasValue())
25
368
    _lastError = doParse();
26
1.07k
  return _lastError.getValue();
27
1.07k
}
28
29
} // end namespace lld