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"
17#include "llvm/IR/LLVMContext.h"
19
20namespace llvm {
21namespace instrumentor {
22
23/// Write the configuration in /p IConf to the file with path \p OutputFile.
25 StringRef OutputFile, LLVMContext &Ctx);
26
27/// Read the configuration from the file with path \p InputFile into /p IConf.
29 StringRef InputFile, LLVMContext &Ctx,
30 vfs::FileSystem &FS);
31
32/// Read the configuration paths from the file with path \p InputFile into \p
33/// Configs.
34LLVM_ABI bool readConfigPathsFile(StringRef InputFile,
35 cl::list<std::string> &Configs,
36 LLVMContext &Ctx, vfs::FileSystem &FS);
37
38} // end namespace instrumentor
39} // end namespace llvm
40
41#endif // LLVM_TRANSFORMS_IPO_INSTRUMENTOR_CONFIGFILE_H
#define LLVM_ABI
Definition Compiler.h:213
LLVM_ABI void writeConfigToJSON(InstrumentationConfig &IConf, StringRef OutputFile, LLVMContext &Ctx)
Write the configuration in /p IConf to the file with path OutputFile.
LLVM_ABI bool readConfigPathsFile(StringRef InputFile, cl::list< std::string > &Configs, LLVMContext &Ctx, vfs::FileSystem &FS)
Read the configuration paths from the file with path InputFile into Configs.
LLVM_ABI bool readConfigFromJSON(InstrumentationConfig &IConf, StringRef InputFile, LLVMContext &Ctx, vfs::FileSystem &FS)
Read the configuration from the file with path InputFile into /p IConf.
This is an optimization pass for GlobalISel generic memory operations.
The class that contains the configuration for the instrumentor.