LCOV - code coverage report
Current view: top level - include/llvm/Option - OptSpecifier.h (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 1 3 33.3 %
Date: 2018-10-20 13:21:21 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //===- OptSpecifier.h - Option Specifiers -----------------------*- 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             : #ifndef LLVM_OPTION_OPTSPECIFIER_H
      11             : #define LLVM_OPTION_OPTSPECIFIER_H
      12             : 
      13             : namespace llvm {
      14             : namespace opt {
      15             : 
      16             : class Option;
      17             : 
      18             : /// OptSpecifier - Wrapper class for abstracting references to option IDs.
      19             : class OptSpecifier {
      20             :   unsigned ID = 0;
      21             : 
      22             : public:
      23             :   OptSpecifier() = default;
      24             :   explicit OptSpecifier(bool) = delete;
      25   254646873 :   /*implicit*/ OptSpecifier(unsigned ID) : ID(ID) {}
      26             :   /*implicit*/ OptSpecifier(const Option *Opt);
      27             : 
      28           0 :   bool isValid() const { return ID != 0; }
      29             : 
      30           0 :   unsigned getID() const { return ID; }
      31             : 
      32             :   bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
      33             :   bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
      34             : };
      35             : 
      36             : } // end namespace opt
      37             : } // end namespace llvm
      38             : 
      39             : #endif // LLVM_OPTION_OPTSPECIFIER_H

Generated by: LCOV version 1.13