LLVM 22.0.0git
CodeViewYAMLTypeHashing.h
Go to the documentation of this file.
1//==- CodeViewYAMLTypeHashing.h - CodeView YAMLIO Type hashing ----*- 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// This file defines classes for handling the YAML representation of CodeView
10// Debug Info.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_OBJECTYAML_CODEVIEWYAMLTYPEHASHING_H
15#define LLVM_OBJECTYAML_CODEVIEWYAMLTYPEHASHING_H
16
17#include "llvm/ADT/ArrayRef.h"
21#include "llvm/Support/Error.h"
23#include <cstdint>
24#include <vector>
25
26namespace llvm {
27
28namespace CodeViewYAML {
29
30struct GlobalHash {
31 GlobalHash() = default;
32 explicit GlobalHash(StringRef S) : Hash(S) {
33 assert(S.size() == 8 && "Invalid hash size!");
34 }
36 assert(S.size() == 8 && "Invalid hash size!");
37 }
39};
40
47
51
52} // end namespace CodeViewYAML
53
54} // end namespace llvm
55
56LLVM_YAML_DECLARE_MAPPING_TRAITS(CodeViewYAML::DebugHSection)
57LLVM_YAML_DECLARE_SCALAR_TRAITS(CodeViewYAML::GlobalHash, QuotingType::None)
58LLVM_YAML_IS_SEQUENCE_VECTOR(CodeViewYAML::GlobalHash)
59
60#endif // LLVM_OBJECTYAML_CODEVIEWYAMLTYPEHASHING_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the BumpPtrAllocator interface.
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote)
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:40
size_t size() const
size - Get the array size.
Definition ArrayRef.h:142
StringRef - Represent a constant reference to a string, i.e.
Definition StringRef.h:55
constexpr size_t size() const
size - Get the string size.
Definition StringRef.h:146
Specialized YAMLIO scalar type for representing a binary blob.
Definition YAML.h:64
ArrayRef< uint8_t > toDebugH(const DebugHSection &DebugH, BumpPtrAllocator &Alloc)
DebugHSection fromDebugH(ArrayRef< uint8_t > DebugH)
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Definition Allocator.h:383