• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ahueck / llvm-dimeta / 23296997048

19 Mar 2026 01:23PM UTC coverage: 64.594% (-9.0%) from 73.626%
23296997048

Pull #49

github

web-flow
Merge f45516abb into cefb3414f
Pull Request #49: Initial Fortran Support

1854 of 3670 branches covered (50.52%)

Branch coverage included in aggregate %.

164 of 435 new or added lines in 15 files covered. (37.7%)

20 existing lines in 6 files now uncovered.

2333 of 2812 relevant lines covered (82.97%)

11668.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.71
/lib/type/DIPath.cpp
1
//  llvm-dimeta library
2
//  Copyright (c) 2022-2025 llvm-dimeta authors
3
//  Distributed under the BSD 3-Clause license.
4
//  (See accompanying file LICENSE)
5
//  SPDX-License-Identifier: BSD-3-Clause
6
//
7

8
#include "DIPath.h"
9

10
#include "llvm/Support/raw_ostream.h"
11

12
#include <algorithm>
13

14
namespace dimeta::type::dipath {
15

16
void ValueToDiPath::emplace_back(const llvm::Value* val, llvm::DIType* mapped_di_type, const std::string reason) {
17,773✔
17
  path_to_ditype.emplace_back(IRMapping{val, mapped_di_type, std::move(reason)});
17,773!
18
}
17,773✔
19

20
std::optional<llvm::DIType*> ValueToDiPath::final_type() const {
4,138✔
21
  if (path_to_ditype.empty()) {
4,138!
NEW
22
    return {};
×
23
  }
24
  const auto& ditype = path_to_ditype.back();
4,138✔
25
  return ditype.mapped != nullptr ? std::optional{ditype.mapped} : std::nullopt;
4,138!
26
}
4,138✔
27

NEW
28
llvm::raw_ostream& operator<<(llvm::raw_ostream& os, const ValueToDiPath& vdp) {
×
29
#if DIMETA_LOG_LEVEL > 2  // FIXME: For coverage
30
  const auto& mappings = vdp.path_to_ditype;
31
  if (mappings.empty()) {
32
    os << "[]";
33
    return os;
34
  }
35

36
  os << "[\n";
37
  for (auto it = mappings.begin(); it != mappings.end(); ++it) {
38
    const auto& mapping = *it;
39
    os << "  {\n";
40
    os << "    IR: ";
41
    if (mapping.value) {
42
      mapping.value->print(os, true);
43
    } else {
44
      os << "null";
45
    }
46
    os << ",\n";
47

48
    os << "    DI: ";
49
    if (mapping.mapped) {
50
      os << log::ditype_str(mapping.mapped);
51
    } else {
52
      os << "null";
53
    }
54

55
    if (!mapping.reason.empty()) {
56
      os << ",\n";
57
      os << "    Reason: \"" << mapping.reason << "\"\n";
58
    } else {
59
      os << "\n";
60
    }
61
    os << "  }";
62
    if (std::next(it) != mappings.end()) {
63
      os << ",";
64
    }
65
    os << "\n";
66
  }
67
  os << "]";
68
#endif
NEW
69
  return os;
×
70
}
71

72
}  // namespace dimeta::type::dipath
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc