Coverage Report

Created: 2019-02-20 00:17

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/include/llvm/DebugInfo/CodeView/TypeRecordMapping.h
Line
Count
Source
1
//===- TypeRecordMapping.h --------------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPERECORDMAPPING_H
10
#define LLVM_DEBUGINFO_CODEVIEW_TYPERECORDMAPPING_H
11
12
#include "llvm/ADT/Optional.h"
13
#include "llvm/DebugInfo/CodeView/CodeViewRecordIO.h"
14
#include "llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h"
15
#include "llvm/Support/Error.h"
16
17
namespace llvm {
18
class BinaryStreamReader;
19
class BinaryStreamWriter;
20
21
namespace codeview {
22
class TypeRecordMapping : public TypeVisitorCallbacks {
23
public:
24
17.7k
  explicit TypeRecordMapping(BinaryStreamReader &Reader) : IO(Reader) {}
25
3.56k
  explicit TypeRecordMapping(BinaryStreamWriter &Writer) : IO(Writer) {}
26
27
  using TypeVisitorCallbacks::visitTypeBegin;
28
  Error visitTypeBegin(CVType &Record) override;
29
  Error visitTypeEnd(CVType &Record) override;
30
31
  Error visitMemberBegin(CVMemberRecord &Record) override;
32
  Error visitMemberEnd(CVMemberRecord &Record) override;
33
34
#define TYPE_RECORD(EnumName, EnumVal, Name)                                   \
35
  Error visitKnownRecord(CVType &CVR, Name##Record &Record) override;
36
#define MEMBER_RECORD(EnumName, EnumVal, Name)                                 \
37
  Error visitKnownMember(CVMemberRecord &CVR, Name##Record &Record) override;
38
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
39
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
40
#include "llvm/DebugInfo/CodeView/CodeViewTypes.def"
41
42
private:
43
  Optional<TypeLeafKind> TypeKind;
44
  Optional<TypeLeafKind> MemberKind;
45
46
  CodeViewRecordIO IO;
47
};
48
}
49
}
50
51
#endif