1*9880d681SAndroid Build Coastguard Worker //===- CoverageViewOptions.h - Code coverage display options -------------===// 2*9880d681SAndroid Build Coastguard Worker // 3*9880d681SAndroid Build Coastguard Worker // The LLVM Compiler Infrastructure 4*9880d681SAndroid Build Coastguard Worker // 5*9880d681SAndroid Build Coastguard Worker // This file is distributed under the University of Illinois Open Source 6*9880d681SAndroid Build Coastguard Worker // License. See LICENSE.TXT for details. 7*9880d681SAndroid Build Coastguard Worker // 8*9880d681SAndroid Build Coastguard Worker //===----------------------------------------------------------------------===// 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Worker #ifndef LLVM_COV_COVERAGEVIEWOPTIONS_H 11*9880d681SAndroid Build Coastguard Worker #define LLVM_COV_COVERAGEVIEWOPTIONS_H 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Worker #include "RenderingSupport.h" 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker namespace llvm { 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Worker /// \brief The options for displaying the code coverage information. 18*9880d681SAndroid Build Coastguard Worker struct CoverageViewOptions { 19*9880d681SAndroid Build Coastguard Worker enum class OutputFormat { 20*9880d681SAndroid Build Coastguard Worker Text, 21*9880d681SAndroid Build Coastguard Worker HTML 22*9880d681SAndroid Build Coastguard Worker }; 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Worker bool Debug; 25*9880d681SAndroid Build Coastguard Worker bool Colors; 26*9880d681SAndroid Build Coastguard Worker bool ShowLineNumbers; 27*9880d681SAndroid Build Coastguard Worker bool ShowLineStats; 28*9880d681SAndroid Build Coastguard Worker bool ShowRegionMarkers; 29*9880d681SAndroid Build Coastguard Worker bool ShowLineStatsOrRegionMarkers; 30*9880d681SAndroid Build Coastguard Worker bool ShowExpandedRegions; 31*9880d681SAndroid Build Coastguard Worker bool ShowFunctionInstantiations; 32*9880d681SAndroid Build Coastguard Worker bool ShowFullFilenames; 33*9880d681SAndroid Build Coastguard Worker OutputFormat Format; 34*9880d681SAndroid Build Coastguard Worker std::string ShowOutputDirectory; 35*9880d681SAndroid Build Coastguard Worker 36*9880d681SAndroid Build Coastguard Worker /// \brief Change the output's stream color if the colors are enabled. colored_ostreamCoverageViewOptions37*9880d681SAndroid Build Coastguard Worker ColoredRawOstream colored_ostream(raw_ostream &OS, 38*9880d681SAndroid Build Coastguard Worker raw_ostream::Colors Color) const { 39*9880d681SAndroid Build Coastguard Worker return llvm::colored_ostream(OS, Color, Colors); 40*9880d681SAndroid Build Coastguard Worker } 41*9880d681SAndroid Build Coastguard Worker 42*9880d681SAndroid Build Coastguard Worker /// \brief Check if an output directory has been specified. hasOutputDirectoryCoverageViewOptions43*9880d681SAndroid Build Coastguard Worker bool hasOutputDirectory() const { return ShowOutputDirectory != ""; } 44*9880d681SAndroid Build Coastguard Worker }; 45*9880d681SAndroid Build Coastguard Worker } 46*9880d681SAndroid Build Coastguard Worker 47*9880d681SAndroid Build Coastguard Worker #endif // LLVM_COV_COVERAGEVIEWOPTIONS_H 48