LLVM 20.0.0git
Macros
YAMLTraits.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/AlignOf.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/SMLoc.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <map>
#include <memory>
#include <new>
#include <optional>
#include <string>
#include <system_error>
#include <type_traits>
#include <vector>

Go to the source code of this file.

Macros

#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
 
#define LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL(TYPE, FLOW)
 
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)    LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL(type, false)
 
#define LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(type)    LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL(type, true)
 
#define LLVM_YAML_DECLARE_MAPPING_TRAITS(Type)
 
#define LLVM_YAML_DECLARE_ENUM_TRAITS(Type)
 
#define LLVM_YAML_DECLARE_BITSET_TRAITS(Type)
 
#define LLVM_YAML_DECLARE_SCALAR_TRAITS(Type, MustQuote)
 
#define LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(_type)
 
#define LLVM_YAML_IS_STRING_MAP(_type)
 

Macro Definition Documentation

◆ LLVM_YAML_DECLARE_BITSET_TRAITS

#define LLVM_YAML_DECLARE_BITSET_TRAITS (   Type)
Value:
namespace llvm { \
namespace yaml { \
template <> struct ScalarBitSetTraits<Type> { \
static void bitset(IO &IO, Type &Options); \
}; \
} \
}
RelocType Type
Definition: COFFYAML.cpp:391
static LVOptions Options
Definition: LVOptions.cpp:25
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18

◆ LLVM_YAML_DECLARE_ENUM_TRAITS

#define LLVM_YAML_DECLARE_ENUM_TRAITS (   Type)
Value:
namespace llvm { \
namespace yaml { \
template <> struct ScalarEnumerationTraits<Type> { \
static void enumeration(IO &io, Type &Value); \
}; \
} \
}

◆ LLVM_YAML_DECLARE_MAPPING_TRAITS

#define LLVM_YAML_DECLARE_MAPPING_TRAITS (   Type)
Value:
namespace llvm { \
namespace yaml { \
template <> struct MappingTraits<Type> { \
static void mapping(IO &IO, Type &Obj); \
}; \
} \
}

◆ LLVM_YAML_DECLARE_SCALAR_TRAITS

#define LLVM_YAML_DECLARE_SCALAR_TRAITS (   Type,
  MustQuote 
)
Value:
namespace llvm { \
namespace yaml { \
template <> struct ScalarTraits<Type> { \
static void output(const Type &Value, void *ctx, raw_ostream &Out); \
static StringRef input(StringRef Scalar, void *ctxt, Type &Value); \
static QuotingType mustQuote(StringRef) { return MustQuote; } \
}; \
} \
}

◆ LLVM_YAML_IS_DOCUMENT_LIST_VECTOR

#define LLVM_YAML_IS_DOCUMENT_LIST_VECTOR (   _type)
Value:
namespace llvm { \
namespace yaml { \
template <unsigned N> \
struct DocumentListTraits<SmallVector<_type, N>> \
: public SequenceTraitsImpl<SmallVector<_type, N>, false> {}; \
template <> \
struct DocumentListTraits<std::vector<_type>> \
: public SequenceTraitsImpl<std::vector<_type>, false> {}; \
} \
}
AMDGPU promote alloca to vector or false DEBUG_TYPE to vector
Implement std::hash so that hash_code can be used in STL containers.
Definition: BitVector.h:858
#define N

◆ LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR

#define LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR (   type)     LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL(type, true)

◆ LLVM_YAML_IS_SEQUENCE_VECTOR

#define LLVM_YAML_IS_SEQUENCE_VECTOR (   type)     LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL(type, false)

◆ LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL

#define LLVM_YAML_IS_SEQUENCE_VECTOR_IMPL (   TYPE,
  FLOW 
)
Value:
namespace llvm { \
namespace yaml { \
static_assert( \
!std::is_fundamental_v<TYPE> && !std::is_same_v<TYPE, std::string> && \
!std::is_same_v<TYPE, llvm::StringRef>, \
"only use LLVM_YAML_IS_SEQUENCE_VECTOR for types you control"); \
template <> struct SequenceElementTraits<TYPE> { \
static const bool flow = FLOW; \
}; \
} \
}

◆ LLVM_YAML_IS_STRING_MAP

#define LLVM_YAML_IS_STRING_MAP (   _type)
Value:
namespace llvm { \
namespace yaml { \
template <> \
struct CustomMappingTraits<std::map<std::string, _type>> \
: public StdMapStringCustomMappingTraitsImpl<_type> {}; \
} \
}

◆ LLVM_YAML_STRONG_TYPEDEF

#define LLVM_YAML_STRONG_TYPEDEF (   _base,
  _type 
)
Value:
struct _type { \
_type() = default; \
_type(const _base v) : value(v) {} \
_type(const _type &v) = default; \
_type &operator=(const _type &rhs) = default; \
_type &operator=(const _base &rhs) { value = rhs; return *this; } \
operator const _base & () const { return value; } \
bool operator==(const _type &rhs) const { return value == rhs.value; } \
bool operator==(const _base &rhs) const { return value == rhs; } \
bool operator<(const _type &rhs) const { return value < rhs.value; } \
_base value; \
using BaseType = _base; \
};
Given that RA is a live value
bool operator<(const DeltaInfo &LHS, int64_t Delta)
Definition: LineTable.cpp:30
bool operator==(const AddressRangeValuePair &LHS, const AddressRangeValuePair &RHS)