Coverage Report

Created: 2020-02-15 09:57

/Users/buildslave/jenkins/workspace/coverage/llvm-project/debuginfo-tests/llvm-prettyprinters/gdb/llvm-support.cpp
Line
Count
Source (jump to first uncovered line)
1
#include "llvm/ADT/ArrayRef.h"
2
#include "llvm/ADT/DenseMap.h"
3
#include "llvm/ADT/Optional.h"
4
#include "llvm/ADT/PointerIntPair.h"
5
#include "llvm/ADT/PointerUnion.h"
6
#include "llvm/ADT/SmallString.h"
7
#include "llvm/ADT/SmallVector.h"
8
#include "llvm/ADT/Twine.h"
9
#include "llvm/ADT/ilist.h"
10
#include "llvm/Support/Error.h"
11
12
int Array[] = {1, 2, 3};
13
auto IntPtr = reinterpret_cast<int *>(0xabc);
14
15
llvm::ArrayRef<int> ArrayRef(Array);
16
llvm::MutableArrayRef<int> MutableArrayRef(Array);
17
llvm::DenseMap<int, int> DenseMap = {{4, 5}, {6, 7}};
18
llvm::Expected<int> ExpectedValue(8);
19
llvm::Expected<int> ExpectedError(llvm::createStringError({}, ""));
20
llvm::Optional<int> OptionalValue(9);
21
llvm::Optional<int> OptionalNone(llvm::None);
22
llvm::SmallVector<int, 5> SmallVector = {10, 11, 12};
23
llvm::SmallString<5> SmallString("foo");
24
llvm::StringRef StringRef = "bar";
25
llvm::Twine Twine = llvm::Twine(SmallString) + StringRef;
26
llvm::PointerIntPair<int *, 1> PointerIntPair(IntPtr, 1);
27
llvm::PointerUnion<float *, int *> PointerUnion(IntPtr);
28
29
using IlistTag = llvm::ilist_tag<struct A>;
30
using SimpleIlistTag = llvm::ilist_tag<struct B>;
31
struct IlistNode : llvm::ilist_node<IlistNode, IlistTag>,
32
                   llvm::ilist_node<IlistNode, SimpleIlistTag> {
33
  int Value;
34
};
35
0
auto Ilist = [] {
36
0
  llvm::ilist<IlistNode, IlistTag> Result;
37
0
  for (int I : {13, 14, 15}) {
38
0
    Result.push_back(new IlistNode);
39
0
    Result.back().Value = I;
40
0
  }
41
0
  return Result;
42
0
}();
43
0
auto SimpleIlist = []() {
44
0
  llvm::simple_ilist<IlistNode, SimpleIlistTag> Result;
45
0
  for (auto &Node : Ilist)
46
0
    Result.push_front(Node);
47
0
  return Result;
48
0
}();
49
50
// Check expected instances to avoid compile errors.
51
auto CheckExpectedValue = static_cast<bool>(ExpectedValue);
52
auto CheckExpectedError = static_cast<bool>(ExpectedError);
53
54
10.7k
int main() { return 0; }