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

          Line data    Source code
       1             : //==- CodeViewYAMLTypeHashing.h - CodeView YAMLIO Type hashing ----*- 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             : // This file defines classes for handling the YAML representation of CodeView
      11             : // Debug Info.
      12             : //
      13             : //===----------------------------------------------------------------------===//
      14             : 
      15             : #ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPEHASHING_H
      16             : #define LLVM_OBJECTYAML_CODEVIEWYAMLTYPEHASHING_H
      17             : 
      18             : #include "llvm/ADT/ArrayRef.h"
      19             : #include "llvm/DebugInfo/CodeView/TypeHashing.h"
      20             : #include "llvm/ObjectYAML/YAML.h"
      21             : #include "llvm/Support/Allocator.h"
      22             : #include "llvm/Support/Error.h"
      23             : #include "llvm/Support/YAMLTraits.h"
      24             : #include <cstdint>
      25             : #include <memory>
      26             : #include <vector>
      27             : 
      28             : namespace llvm {
      29             : 
      30             : namespace CodeViewYAML {
      31             : 
      32             : struct GlobalHash {
      33             :   GlobalHash() = default;
      34             :   explicit GlobalHash(StringRef S) : Hash(S) {
      35             :     assert(S.size() == 8 && "Invalid hash size!");
      36             :   }
      37          24 :   explicit GlobalHash(ArrayRef<uint8_t> S) : Hash(S) {
      38             :     assert(S.size() == 8 && "Invalid hash size!");
      39             :   }
      40             :   yaml::BinaryRef Hash;
      41             : };
      42             : 
      43           5 : struct DebugHSection {
      44             :   uint32_t Magic;
      45             :   uint16_t Version;
      46             :   uint16_t HashAlgorithm;
      47             :   std::vector<GlobalHash> Hashes;
      48             : };
      49             : 
      50             : DebugHSection fromDebugH(ArrayRef<uint8_t> DebugH);
      51             : ArrayRef<uint8_t> toDebugH(const DebugHSection &DebugH,
      52             :                            BumpPtrAllocator &Alloc);
      53             : 
      54             : } // end namespace CodeViewYAML
      55             : 
      56             : } // end namespace llvm
      57             : 
      58             : LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::DebugHSection)
      59           0 : LLVM_YAML_DECLARE_SCALAR_TRAITS(CodeViewYAML::GlobalHash, QuotingType::None)
      60             : LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::GlobalHash)
      61             : 
      62             : #endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPES_H

Generated by: LCOV version 1.13