Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Analysis/ValueLattice.cpp
Line
Count
Source (jump to first uncovered line)
1
//===- ValueLattice.cpp - Value constraint analysis -------------*- C++ -*-===//
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 "llvm/Analysis/ValueLattice.h"
10
11
namespace llvm {
12
111
raw_ostream &operator<<(raw_ostream &OS, const ValueLatticeElement &Val) {
13
111
  if (Val.isUndefined())
14
0
    return OS << "undefined";
15
111
  if (Val.isOverdefined())
16
88
    return OS << "overdefined";
17
23
18
23
  if (Val.isNotConstant())
19
0
    return OS << "notconstant<" << *Val.getNotConstant() << ">";
20
23
  if (Val.isConstantRange())
21
23
    return OS << "constantrange<" << Val.getConstantRange().getLower() << ", "
22
23
              << Val.getConstantRange().getUpper() << ">";
23
0
  return OS << "constant<" << *Val.getConstant() << ">";
24
0
}
25
} // end namespace llvm