diff libc/benchmarks/JSON.h @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libc/benchmarks/JSON.h	Tue Jun 08 06:07:14 2021 +0900
@@ -0,0 +1,28 @@
+//===-- JSON serialization routines -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_UTILS_BENCHMARK_JSON_H
+#define LLVM_LIBC_UTILS_BENCHMARK_JSON_H
+
+#include "LibcBenchmark.h"
+#include "LibcMemoryBenchmark.h"
+#include "llvm/Support/JSON.h"
+
+namespace llvm {
+namespace libc_benchmarks {
+
+// Parses a Study from a json string.
+Expected<Study> parseJsonStudy(StringRef Content);
+
+// Serialize a Study as json.
+void serializeToJson(const Study &S, llvm::json::OStream &JOS);
+
+} // namespace libc_benchmarks
+} // namespace llvm
+
+#endif // LLVM_LIBC_UTILS_BENCHMARK_JSON_H