diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-05 19:32:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-05 19:32:12 +0000 |
commit | 5516347535ddf0c27cd207135ebf9ce975f30673 (patch) | |
tree | 4b89b4e60378e5864eaa0c27c1febe8246ee2805 /support/lib/Support/PluginLoader.cpp | |
parent | 091bbbada30ef4c17e5f66b740adda0acf7cc31a (diff) |
Move support/lib into lib/Support
Move support/tools into utils
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8878 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/lib/Support/PluginLoader.cpp')
-rw-r--r-- | support/lib/Support/PluginLoader.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/support/lib/Support/PluginLoader.cpp b/support/lib/Support/PluginLoader.cpp deleted file mode 100644 index 76c5e8197d..0000000000 --- a/support/lib/Support/PluginLoader.cpp +++ /dev/null @@ -1,31 +0,0 @@ -//===-- PluginLoader.cpp - Implement -load command line option ------------===// -// -// This file implements the -load <plugin> command line option processor. When -// linked into a program, this new command line option is available that allows -// users to load shared objects into the running program. -// -// Note that there are no symbols exported by the .o file generated for this -// .cpp file. Because of this, a program must link against support.o instead of -// support.a: otherwise this translation unit will not be included. -// -//===----------------------------------------------------------------------===// - -#include "Support/CommandLine.h" -#include "Config/dlfcn.h" -#include "Config/link.h" -#include <iostream> - -namespace { - struct PluginLoader { - void operator=(const std::string &Filename) { - if (dlopen(Filename.c_str(), RTLD_NOW|RTLD_GLOBAL) == 0) - std::cerr << "Error opening '" << Filename << "': " << dlerror() - << "\n -load request ignored.\n"; - } - }; -} - -// This causes operator= above to be invoked for every -load option. -static cl::opt<PluginLoader, false, cl::parser<std::string> > -LoadOpt("load", cl::ZeroOrMore, cl::value_desc("plugin.so"), - cl::desc("Load the specified plugin")); |