|
|
|||
File indexing completed on 2026-05-10 08:44:33
0001 //===-- llvm/Support/PluginLoader.h - Plugin Loader for Tools ---*- C++ -*-===// 0002 // 0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 0004 // See https://llvm.org/LICENSE.txt for license information. 0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 0006 // 0007 //===----------------------------------------------------------------------===// 0008 // 0009 // A tool can #include this file to get a -load option that allows the user to 0010 // load arbitrary shared objects into the tool's address space. Note that this 0011 // header can only be included by a program ONCE, so it should never to used by 0012 // library authors. 0013 // 0014 //===----------------------------------------------------------------------===// 0015 0016 #ifndef LLVM_SUPPORT_PLUGINLOADER_H 0017 #define LLVM_SUPPORT_PLUGINLOADER_H 0018 0019 #ifndef DONT_GET_PLUGIN_LOADER_OPTION 0020 #include "llvm/Support/CommandLine.h" 0021 #endif 0022 0023 #include <string> 0024 0025 namespace llvm { 0026 struct PluginLoader { 0027 void operator=(const std::string &Filename); 0028 static unsigned getNumPlugins(); 0029 static std::string& getPlugin(unsigned num); 0030 }; 0031 0032 #ifndef DONT_GET_PLUGIN_LOADER_OPTION 0033 // This causes operator= above to be invoked for every -load option. 0034 static cl::opt<PluginLoader, false, cl::parser<std::string>> 0035 LoadOpt("load", cl::value_desc("pluginfilename"), 0036 cl::desc("Load the specified plugin")); 0037 #endif 0038 } 0039 0040 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|