Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/lld/lib/Core/File.cpp
Line
Count
Source
1
//===- Core/File.cpp - A Container of Atoms -------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "lld/Core/File.h"
10
#include <mutex>
11
12
namespace lld {
13
14
1.33k
File::~File() = default;
15
16
File::AtomVector<DefinedAtom> File::_noDefinedAtoms;
17
File::AtomVector<UndefinedAtom> File::_noUndefinedAtoms;
18
File::AtomVector<SharedLibraryAtom> File::_noSharedLibraryAtoms;
19
File::AtomVector<AbsoluteAtom> File::_noAbsoluteAtoms;
20
21
1.08k
std::error_code File::parse() {
22
1.08k
  std::lock_guard<std::mutex> lock(_parseMutex);
23
1.08k
  if (!_lastError.hasValue())
24
370
    _lastError = doParse();
25
1.08k
  return _lastError.getValue();
26
1.08k
}
27
28
} // end namespace lld