diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-14 21:35:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-14 21:35:53 +0000 |
commit | 2cdd21c2e4d855500dfb53f77aa74da53ccf9de6 (patch) | |
tree | 98803f88a663bba4b7955f121b58306f5ae11d85 /lib/Support/ToolRunner.cpp | |
parent | b6d465f8131f5fb0b8e565685fb3395ed9aecbdb (diff) |
Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10464 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/ToolRunner.cpp')
-rw-r--r-- | lib/Support/ToolRunner.cpp | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/lib/Support/ToolRunner.cpp b/lib/Support/ToolRunner.cpp index 0f2e13e20f..b1fb64b990 100644 --- a/lib/Support/ToolRunner.cpp +++ b/lib/Support/ToolRunner.cpp @@ -18,25 +18,26 @@ #include "Support/FileUtilities.h" #include <iostream> #include <fstream> - -namespace llvm { +using namespace llvm; //===---------------------------------------------------------------------===// // LLI Implementation of AbstractIntepreter interface // -class LLI : public AbstractInterpreter { - std::string LLIPath; // The path to the LLI executable -public: - LLI(const std::string &Path) : LLIPath(Path) { } - - - virtual int ExecuteProgram(const std::string &Bytecode, - const std::vector<std::string> &Args, - const std::string &InputFile, - const std::string &OutputFile, - const std::vector<std::string> &SharedLibs = +namespace { + class LLI : public AbstractInterpreter { + std::string LLIPath; // The path to the LLI executable + public: + LLI(const std::string &Path) : LLIPath(Path) { } + + + virtual int ExecuteProgram(const std::string &Bytecode, + const std::vector<std::string> &Args, + const std::string &InputFile, + const std::string &OutputFile, + const std::vector<std::string> &SharedLibs = std::vector<std::string>()); -}; + }; +} int LLI::ExecuteProgram(const std::string &Bytecode, const std::vector<std::string> &Args, @@ -148,19 +149,21 @@ LLC *AbstractInterpreter::createLLC(const std::string &ProgramPath, //===---------------------------------------------------------------------===// // JIT Implementation of AbstractIntepreter interface // -class JIT : public AbstractInterpreter { - std::string LLIPath; // The path to the LLI executable -public: - JIT(const std::string &Path) : LLIPath(Path) { } - - - virtual int ExecuteProgram(const std::string &Bytecode, - const std::vector<std::string> &Args, - const std::string &InputFile, - const std::string &OutputFile, - const std::vector<std::string> &SharedLibs = +namespace { + class JIT : public AbstractInterpreter { + std::string LLIPath; // The path to the LLI executable + public: + JIT(const std::string &Path) : LLIPath(Path) { } + + + virtual int ExecuteProgram(const std::string &Bytecode, + const std::vector<std::string> &Args, + const std::string &InputFile, + const std::string &OutputFile, + const std::vector<std::string> &SharedLibs = std::vector<std::string>()); -}; + }; +} int JIT::ExecuteProgram(const std::string &Bytecode, const std::vector<std::string> &Args, @@ -396,5 +399,3 @@ GCC *GCC::create(const std::string &ProgramPath, std::string &Message) { Message = "Found gcc: " + GCCPath + "\n"; return new GCC(GCCPath); } - -} // End llvm namespace |