/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/Analysis/ValueLattice.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | //===- ValueLattice.cpp - Value constraint analysis -------------*- C++ -*-===// |
2 | | // |
3 | | // The LLVM Compiler Infrastructure |
4 | | // |
5 | | // This file is distributed under the University of Illinois Open Source |
6 | | // License. See LICENSE.TXT for details. |
7 | | // |
8 | | //===----------------------------------------------------------------------===// |
9 | | |
10 | | #include "llvm/Analysis/ValueLattice.h" |
11 | | |
12 | | namespace llvm { |
13 | 111 | raw_ostream &operator<<(raw_ostream &OS, const ValueLatticeElement &Val) { |
14 | 111 | if (Val.isUndefined()) |
15 | 0 | return OS << "undefined"; |
16 | 111 | if (111 Val.isOverdefined()111 ) |
17 | 90 | return OS << "overdefined"; |
18 | 21 | |
19 | 21 | if (21 Val.isNotConstant()21 ) |
20 | 0 | return OS << "notconstant<" << *Val.getNotConstant() << ">"; |
21 | 21 | if (21 Val.isConstantRange()21 ) |
22 | 21 | return OS << "constantrange<" << Val.getConstantRange().getLower() << ", " |
23 | 21 | << Val.getConstantRange().getUpper() << ">"; |
24 | 0 | return OS << "constant<" << *Val.getConstant() << ">"; |
25 | 0 | } |
26 | | } // end namespace llvm |