llvm

package
v0.0.0-...-8023e94 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package llvm defines data structures that can be used to read code coverage information exported from the llvm-cov tool. The schema is defined in: https://github.com/llvm/llvm-project/blob/HEAD/llvm/tools/llvm-cov/CoverageExporterJson.cpp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Counts

type Counts struct {
	Count      int     `json:"count"`
	Covered    int     `json:"covered"`
	NotCovered int     `json:"notcovered"`
	Percent    float32 `json:"percent"`
}

type Data

type Data struct {
	Files     []File     `json:"files"`
	Functions []Function `json:"functions,omitempty"`
	Totals    Summary    `json:"totals"`
}

type Expansion

type Expansion struct {
	Filenames     []string `json:"filenames"`
	SourceRegion  []int    `json:"source_region"`
	TargetRegions [][]int  `json:"target_regions"`
}

type Export

type Export struct {
	Data    []Data `json:"data"`
	Type    string `json:"type"`
	Version string `json:"version"`
}

type File

type File struct {
	Expansions []Expansion `json:"expansions,omitempty"`
	Filename   string      `json:"filename"`
	Segments   []Segment   `json:"segments"`
	Summary    Summary     `json:"summary"`
}

type Function

type Function struct {
	Count     int      `json:"count"`
	Filenames []string `json:"filenames"`
	Name      string   `json:"name"`
	Regions   []Region `json:"regions"`
}

type Region

type Region struct {
	LineStart      int
	ColumnStart    int
	LineEnd        int
	ColumnEnd      int
	ExecutionCount int
	FileID         int
	ExpandedFileID int
	Kind           int
}

func (*Region) UnmarshalJSON

func (r *Region) UnmarshalJSON(buf []byte) error

type Segment

type Segment struct {
	LineNumber    int
	ColumnNumber  int
	Count         int
	HasCount      bool
	IsRegionEntry bool
	IsGapRegion   bool
}

func (*Segment) UnmarshalJSON

func (s *Segment) UnmarshalJSON(buf []byte) error

type Summary

type Summary struct {
	Functions      Counts `json:"functions"`
	Instantiations Counts `json:"instantiations"`
	Lines          Counts `json:"lines"`
	Regions        Counts `json:"regions"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL