LLVM
10.0.0
include
llvm
Support
PluginLoader.h
Go to the documentation of this file.
1
//===-- llvm/Support/PluginLoader.h - Plugin Loader for Tools ---*- 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
//===----------------------------------------------------------------------===//
8
//
9
// A tool can #include this file to get a -load option that allows the user to
10
// load arbitrary shared objects into the tool's address space. Note that this
11
// header can only be included by a program ONCE, so it should never to used by
12
// library authors.
13
//
14
//===----------------------------------------------------------------------===//
15
16
#ifndef LLVM_SUPPORT_PLUGINLOADER_H
17
#define LLVM_SUPPORT_PLUGINLOADER_H
18
19
#include "
llvm/Support/CommandLine.h
"
20
21
namespace
llvm
{
22
struct
PluginLoader
{
23
void
operator=
(
const
std::string &Filename);
24
static
unsigned
getNumPlugins
();
25
static
std::string&
getPlugin
(
unsigned
num);
26
};
27
28
#ifndef DONT_GET_PLUGIN_LOADER_OPTION
29
// This causes operator= above to be invoked for every -load option.
30
static
cl::opt<PluginLoader, false, cl::parser<std::string>
>
31
LoadOpt
(
"load"
,
cl::ZeroOrMore
,
cl::value_desc
(
"pluginfilename"
),
32
cl::desc
(
"Load the specified plugin"
));
33
#endif
34
}
35
36
#endif
llvm
This class represents lattice values for constants.
Definition:
AllocatorList.h:23
llvm::PluginLoader::operator=
void operator=(const std::string &Filename)
Definition:
PluginLoader.cpp:25
llvm::cl::value_desc
Definition:
CommandLine.h:416
llvm::PluginLoader::getNumPlugins
static unsigned getNumPlugins()
Definition:
PluginLoader.cpp:36
llvm::LoadOpt
static cl::opt< PluginLoader, false, cl::parser< std::string > > LoadOpt("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"), cl::desc("Load the specified plugin"))
CommandLine.h
llvm::cl::desc
Definition:
CommandLine.h:406
llvm::cl::ZeroOrMore
Definition:
CommandLine.h:125
llvm::PluginLoader
Definition:
PluginLoader.h:22
llvm::cl::opt
Definition:
CommandLine.h:1415
llvm::PluginLoader::getPlugin
static std::string & getPlugin(unsigned num)
Definition:
PluginLoader.cpp:41
Generated on Tue Mar 24 2020 13:08:29 for LLVM by
1.8.13