Coverage Report

Created: 2025-01-28 06:38

/src/hermes/lib/BCGen/HBC/UniquingFilenameTable.cpp
Line
Count
Source
1
/*
2
 * Copyright (c) Meta Platforms, Inc. and affiliates.
3
 *
4
 * This source code is licensed under the MIT license found in the
5
 * LICENSE file in the root directory of this source tree.
6
 */
7
8
#include "hermes/BCGen/HBC/UniquingFilenameTable.h"
9
10
#include <iterator>
11
12
namespace hermes {
13
namespace hbc {
14
15
196
uint32_t UniquingFilenameTable::addFilename(llvh::StringRef filename) {
16
196
  return filenames_.insert(filename);
17
196
}
18
19
/* static */ ConsecutiveStringStorage UniquingFilenameTable::toStorage(
20
196
    UniquingFilenameTable table) {
21
196
  auto &filenames = table.filenames_;
22
196
  return ConsecutiveStringStorage{
23
196
      filenames.begin(), filenames.end(), std::false_type{}, false};
24
196
}
25
26
} // namespace hbc
27
} // namespace hermes