Paula Toth | 66d00fe | 2020-04-08 17:16:30 | [diff] [blame] | 1 | //===-- JSON serialization routines -----------------------------*- C++ -*-===// |
Guillaume Chatelet | aba80d0 | 2020-01-06 12:17:04 | [diff] [blame] | 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 | #ifndef LLVM_LIBC_UTILS_BENCHMARK_JSON_H |
| 10 | #define LLVM_LIBC_UTILS_BENCHMARK_JSON_H |
| 11 | |
| 12 | #include "LibcBenchmark.h" |
| 13 | #include "LibcMemoryBenchmark.h" |
| 14 | #include "llvm/Support/JSON.h" |
| 15 | |
| 16 | namespace llvm { |
| 17 | namespace libc_benchmarks { |
| 18 | |
| 19 | // Parses a Study from a json string. |
Guillaume Chatelet | deae7e9 | 2020-12-17 13:16:14 | [diff] [blame] | 20 | Expected<Study> parseJsonStudy(StringRef Content); |
Guillaume Chatelet | aba80d0 | 2020-01-06 12:17:04 | [diff] [blame] | 21 | |
| 22 | // Serialize a Study as json. |
Guillaume Chatelet | deae7e9 | 2020-12-17 13:16:14 | [diff] [blame] | 23 | void serializeToJson(const Study &S, llvm::json::OStream &JOS); |
Guillaume Chatelet | aba80d0 | 2020-01-06 12:17:04 | [diff] [blame] | 24 | |
| 25 | } // namespace libc_benchmarks |
| 26 | } // namespace llvm |
| 27 | |
| 28 | #endif // LLVM_LIBC_UTILS_BENCHMARK_JSON_H |