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

ahueck / llvm-dimeta / 23300805560

19 Mar 2026 02:49PM UTC coverage: 73.206% (-0.4%) from 73.626%
23300805560

push

github

web-flow
Initial Fortran Support (#49)

2176 of 3670 branches covered (59.29%)

Branch coverage included in aggregate %.

388 of 445 new or added lines in 15 files covered. (87.19%)

19 existing lines in 5 files now uncovered.

2578 of 2824 relevant lines covered (91.29%)

14323.15 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) {
22,195✔
17
  path_to_ditype.emplace_back(IRMapping{val, mapped_di_type, std::move(reason)});
22,195!
18
}
22,195✔
19

20
std::optional<llvm::DIType*> ValueToDiPath::final_type() const {
5,222✔
21
  if (path_to_ditype.empty()) {
5,222!
NEW
22
    return {};
×
23
  }
24
  const auto& ditype = path_to_ditype.back();
5,222✔
25
  return ditype.mapped != nullptr ? std::optional{ditype.mapped} : std::nullopt;
5,222!
26
}
5,222✔
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