[RDF] Add RegisterRef::idx and make toUnitId constexpr
[llvm-project.git] / libc / benchmarks / JSON.h
blob0b7a249b971aa117cbeacabb1924b511cea433a0
1 //===-- JSON serialization routines -----------------------------*- 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_UTILS_BENCHMARK_JSON_H
10 #define LLVM_LIBC_UTILS_BENCHMARK_JSON_H
12 #include "LibcBenchmark.h"
13 #include "LibcMemoryBenchmark.h"
14 #include "llvm/Support/JSON.h"
16 namespace llvm {
17 namespace libc_benchmarks {
19 // Parses a Study from a json string.
20 Expected<Study> parseJsonStudy(StringRef Content);
22 // Serialize a Study as json.
23 void serializeToJson(const Study &S, llvm::json::OStream &JOS);
25 } // namespace libc_benchmarks
26 } // namespace llvm
28 #endif // LLVM_LIBC_UTILS_BENCHMARK_JSON_H