LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PluginLoader.h

Go to the documentation of this file.
00001 //===-- llvm/Support/PluginLoader.h - Plugin Loader for Tools ---*- C++ -*-===//
00002 // 
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file was developed by the LLVM research group and is distributed under
00006 // the University of Illinois Open Source License. See LICENSE.TXT for details.
00007 // 
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // A tool can #include this file to get a -load option that allows the user to
00011 // load arbitrary shared objects into the tool's address space.  Note that this
00012 // header can only be included by a program ONCE, so it should never to used by
00013 // library authors.
00014 //
00015 //===----------------------------------------------------------------------===//
00016 
00017 #ifndef LLVM_SUPPORT_PLUGINLOADER_H
00018 #define LLVM_SUPPORT_PLUGINLOADER_H
00019 
00020 #include "llvm/Support/CommandLine.h"
00021 
00022 namespace llvm {
00023   struct PluginLoader {
00024     void operator=(const std::string &Filename);
00025   };
00026 
00027 #ifndef DONT_GET_PLUGIN_LOADER_OPTION
00028   // This causes operator= above to be invoked for every -load option.
00029   static cl::opt<PluginLoader, false, cl::parser<std::string> >
00030     LoadOpt("load", cl::ZeroOrMore, cl::value_desc("pluginfilename"),
00031             cl::desc("Load the specified plugin"));
00032 #endif
00033 }
00034 
00035 #endif