llvm.org GIT mirror llvm / 170d3af
Add a new header git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14737 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 70 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 //===-- Support/PluginLoader.h - Provide -load option to tool ---*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file was developed by the LLVM research group and is distributed under
5 // the University of Illinois Open Source License. See LICENSE.TXT for details.
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 SUPPORT_PLUGINLOADER_H
17 #define SUPPORT_PLUGINLOADER_H
18
19 #include "Support/CommandLine.h"
20
21 namespace llvm {
22 struct PluginLoader {
23 void operator=(const std::string &Filename);
24 };
25
26 #ifndef DONT_GET_PLUGIN_LOADER_OPTION
27 // This causes operator= above to be invoked for every -load option.
28 static cl::opt >
29 LoadOpt("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"),
30 cl::desc("Load the specified plugin"));
31 #endif
32 }
33
34 #endif
0 //===-- Support/PluginLoader.h - Provide -load option to tool ---*- C++ -*-===//
1 //
2 // The LLVM Compiler Infrastructure
3 //
4 // This file was developed by the LLVM research group and is distributed under
5 // the University of Illinois Open Source License. See LICENSE.TXT for details.
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 SUPPORT_PLUGINLOADER_H
17 #define SUPPORT_PLUGINLOADER_H
18
19 #include "Support/CommandLine.h"
20
21 namespace llvm {
22 struct PluginLoader {
23 void operator=(const std::string &Filename);
24 };
25
26 #ifndef DONT_GET_PLUGIN_LOADER_OPTION
27 // This causes operator= above to be invoked for every -load option.
28 static cl::opt >
29 LoadOpt("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"),
30 cl::desc("Load the specified plugin"));
31 #endif
32 }
33
34 #endif