LLVM 22.0.0git
PropertySet.h
Go to the documentation of this file.
1///===- llvm/Frontend/Offloading/PropertySet.h ----------------------------===//
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/// \file This file defines PropertySetRegistry and PropertyValue types and
9/// provides helper functions to translate PropertySetRegistry from/to JSON.
10//===----------------------------------------------------------------------===//
11
14#include "llvm/Support/Error.h"
15
16#include <map>
17#include <variant>
18
19namespace llvm {
20class raw_ostream;
21class MemoryBufferRef;
22
23namespace offloading {
24
26using PropertyValue = std::variant<uint32_t, ByteArray>;
27using PropertySet = std::map<std::string, PropertyValue>;
28using PropertySetRegistry = std::map<std::string, PropertySet>;
29
31 raw_ostream &O);
34
35} // namespace offloading
36} // namespace llvm
#define LLVM_ABI
Definition: Compiler.h:213
#define P(N)
This file defines the SmallVector class.
Tagged union holding either a T or a Error.
Definition: Error.h:485
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1197
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
LLVM_ABI Expected< PropertySetRegistry > readPropertiesFromJSON(MemoryBufferRef Buf)
Definition: PropertySet.cpp:67
std::map< std::string, PropertyValue > PropertySet
Definition: PropertySet.h:27
LLVM_ABI void writePropertiesToJSON(const PropertySetRegistry &P, raw_ostream &O)
Definition: PropertySet.cpp:17
std::map< std::string, PropertySet > PropertySetRegistry
Definition: PropertySet.h:28
std::variant< uint32_t, ByteArray > PropertyValue
Definition: PropertySet.h:26
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18