LLVM 23.0.0git
InstrumentorConfigFile.h
Go to the documentation of this file.
1//===-- Transforms/IPO/InstrumentorConfigFile.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//
9// Utilities for the Instrumentor JSON configuration file.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TRANSFORMS_IPO_INSTRUMENTOR_CONFIGFILE_H
14#define LLVM_TRANSFORMS_IPO_INSTRUMENTOR_CONFIGFILE_H
15
16#include "llvm/ADT/StringRef.h"
18
19namespace llvm {
20namespace instrumentor {
21
22/// Write the configuration in /p IConf to the file with path \p OutputFile.
23void writeConfigToJSON(InstrumentationConfig &IConf, StringRef OutputFile,
24 LLVMContext &Ctx);
25
26/// Read the configuration from the file with path \p InputFile into /p IConf.
27bool readConfigFromJSON(InstrumentationConfig &IConf, StringRef InputFile,
28 LLVMContext &Ctx);
29
30} // end namespace instrumentor
31} // end namespace llvm
32
33#endif // LLVM_TRANSFORMS_IPO_INSTRUMENTOR_CONFIGFILE_H
bool readConfigFromJSON(InstrumentationConfig &IConf, StringRef InputFile, LLVMContext &Ctx)
Read the configuration from the file with path InputFile into /p IConf.
void writeConfigToJSON(InstrumentationConfig &IConf, StringRef OutputFile, LLVMContext &Ctx)
Write the configuration in /p IConf to the file with path OutputFile.
This is an optimization pass for GlobalISel generic memory operations.
The class that contains the configuration for the instrumentor.