summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/ConstantRange.cpp5
-rw-r--r--lib/Support/Annotation.cpp5
-rw-r--r--lib/Support/CommandLine.cpp5
-rw-r--r--lib/Support/ConstantRange.cpp5
-rw-r--r--lib/Support/Debug.cpp11
-rw-r--r--lib/Support/DynamicLinker.cpp11
-rw-r--r--lib/Support/FileUtilities.cpp35
-rw-r--r--lib/Support/LeakDetector.cpp5
-rw-r--r--lib/Support/Mangler.cpp5
-rw-r--r--lib/Support/PluginLoader.cpp5
-rw-r--r--lib/Support/Signals.cpp7
-rw-r--r--lib/Support/SystemUtils.cpp26
-rw-r--r--lib/Support/ToolRunner.cpp57
-rw-r--r--lib/Support/ValueHolder.cpp4
-rw-r--r--lib/VMCore/ConstantRange.cpp5
-rw-r--r--lib/VMCore/LeakDetector.cpp5
-rw-r--r--lib/VMCore/Mangler.cpp5
-rw-r--r--tools/bugpoint/ToolRunner.cpp57
18 files changed, 106 insertions, 152 deletions
diff --git a/lib/Analysis/ConstantRange.cpp b/lib/Analysis/ConstantRange.cpp
index e180f12a1a..7b45d20b53 100644
--- a/lib/Analysis/ConstantRange.cpp
+++ b/lib/Analysis/ConstantRange.cpp
@@ -25,8 +25,7 @@
#include "llvm/Type.h"
#include "llvm/Instruction.h"
#include "llvm/ConstantHandling.h"
-
-namespace llvm {
+using namespace llvm;
/// Initialize a full (the default) or empty set for the specified type.
///
@@ -250,5 +249,3 @@ void ConstantRange::print(std::ostream &OS) const {
void ConstantRange::dump() const {
print(std::cerr);
}
-
-} // End llvm namespace
diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp
index b88624dd1f..bcd196da44 100644
--- a/lib/Support/Annotation.cpp
+++ b/lib/Support/Annotation.cpp
@@ -13,8 +13,7 @@
#include <map>
#include "Support/Annotation.h"
-
-namespace llvm {
+using namespace llvm;
typedef std::map<const std::string, unsigned> IDMapType;
static unsigned IDCounter = 0; // Unique ID counter
@@ -96,5 +95,3 @@ Annotation *AnnotationManager::createAnnotation(AnnotationID ID,
if (I == getFactMap().end()) return 0;
return I->second.first(ID, Obj, I->second.second);
}
-
-} // End llvm namespace
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 235dc12843..8a6bd77e40 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -23,8 +23,7 @@
#include <iostream>
#include <cstdlib>
#include <cerrno>
-
-namespace llvm {
+using namespace llvm;
using namespace cl;
@@ -889,5 +888,3 @@ HHOp("help-hidden", cl::desc("display all available options"),
cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed);
} // End anonymous namespace
-
-} // End llvm namespace
diff --git a/lib/Support/ConstantRange.cpp b/lib/Support/ConstantRange.cpp
index e180f12a1a..7b45d20b53 100644
--- a/lib/Support/ConstantRange.cpp
+++ b/lib/Support/ConstantRange.cpp
@@ -25,8 +25,7 @@
#include "llvm/Type.h"
#include "llvm/Instruction.h"
#include "llvm/ConstantHandling.h"
-
-namespace llvm {
+using namespace llvm;
/// Initialize a full (the default) or empty set for the specified type.
///
@@ -250,5 +249,3 @@ void ConstantRange::print(std::ostream &OS) const {
void ConstantRange::dump() const {
print(std::cerr);
}
-
-} // End llvm namespace
diff --git a/lib/Support/Debug.cpp b/lib/Support/Debug.cpp
index 1af23380a2..f171342949 100644
--- a/lib/Support/Debug.cpp
+++ b/lib/Support/Debug.cpp
@@ -23,12 +23,11 @@
//
//===----------------------------------------------------------------------===//
-#include "Support/Statistic.h"
+#include "Support/Debug.h"
#include "Support/CommandLine.h"
+using namespace llvm;
-namespace llvm {
-
-bool DebugFlag; // DebugFlag - Exported boolean set by the -debug option
+bool llvm::DebugFlag; // DebugFlag - Exported boolean set by the -debug option
namespace {
#ifndef NDEBUG
@@ -57,12 +56,10 @@ namespace {
// specified on the command line, or if none was specified on the command line
// with the -debug-only=X option.
//
-bool isCurrentDebugType(const char *DebugType) {
+bool llvm::isCurrentDebugType(const char *DebugType) {
#ifndef NDEBUG
return CurrentDebugType.empty() || DebugType == CurrentDebugType;
#else
return false;
#endif
}
-
-} // End llvm namespace
diff --git a/lib/Support/DynamicLinker.cpp b/lib/Support/DynamicLinker.cpp
index 1c9385eea7..801f93b5ba 100644
--- a/lib/Support/DynamicLinker.cpp
+++ b/lib/Support/DynamicLinker.cpp
@@ -22,10 +22,9 @@
#include "Support/DynamicLinker.h"
#include "Config/dlfcn.h"
#include <cassert>
+using namespace llvm;
-namespace llvm {
-
-bool LinkDynamicObject (const char *filename, std::string *ErrorMessage) {
+bool llvm::LinkDynamicObject (const char *filename, std::string *ErrorMessage) {
#if defined (HAVE_DLOPEN)
if (dlopen (filename, RTLD_NOW | RTLD_GLOBAL) == 0) {
if (ErrorMessage) *ErrorMessage = dlerror ();
@@ -37,7 +36,7 @@ bool LinkDynamicObject (const char *filename, std::string *ErrorMessage) {
#endif
}
-void *GetAddressOfSymbol (const char *symbolName) {
+void *llvm::GetAddressOfSymbol (const char *symbolName) {
#if defined (HAVE_DLOPEN)
#ifdef RTLD_DEFAULT
return dlsym (RTLD_DEFAULT, symbolName);
@@ -51,8 +50,6 @@ void *GetAddressOfSymbol (const char *symbolName) {
}
// soft, cushiony C++ interface.
-void *GetAddressOfSymbol (const std::string &symbolName) {
+void *llvm::GetAddressOfSymbol (const std::string &symbolName) {
return GetAddressOfSymbol (symbolName.c_str ());
}
-
-} // End llvm namespace
diff --git a/lib/Support/FileUtilities.cpp b/lib/Support/FileUtilities.cpp
index 4e3c22ce7c..e6abc8fb40 100644
--- a/lib/Support/FileUtilities.cpp
+++ b/lib/Support/FileUtilities.cpp
@@ -19,14 +19,12 @@
#include <fstream>
#include <iostream>
#include <cstdio>
-
-namespace llvm
-{
+using namespace llvm;
/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must
/// name a readable file.
///
-bool CheckMagic (const std::string &FN, const std::string &Magic) {
+bool llvm::CheckMagic(const std::string &FN, const std::string &Magic) {
char buf[1 + Magic.size ()];
std::ifstream f (FN.c_str ());
f.read (buf, Magic.size ());
@@ -37,7 +35,7 @@ bool CheckMagic (const std::string &FN, const std::string &Magic) {
/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library
/// archive. The file named FN must exist.
///
-bool IsArchive(const std::string &FN) {
+bool llvm::IsArchive(const std::string &FN) {
// Inspect the beginning of the file to see if it contains the "ar"
// library archive format magic string.
return CheckMagic (FN, "!<arch>\012");
@@ -46,7 +44,7 @@ bool IsArchive(const std::string &FN) {
/// IsBytecode - Returns true IFF the file named FN appears to be an LLVM
/// bytecode file. The file named FN must exist.
///
-bool IsBytecode(const std::string &FN) {
+bool llvm::IsBytecode(const std::string &FN) {
// Inspect the beginning of the file to see if it contains the LLVM
// bytecode format magic string.
return CheckMagic (FN, "llvm");
@@ -55,7 +53,7 @@ bool IsBytecode(const std::string &FN) {
/// IsSharedObject - Returns trus IFF the file named FN appears to be a shared
/// object with an ELF header. The file named FN must exist.
///
-bool IsSharedObject(const std::string &FN) {
+bool llvm::IsSharedObject(const std::string &FN) {
// Inspect the beginning of the file to see if it contains the ELF shared
// object magic string.
static const char elfMagic[] = { 0x7f, 'E', 'L', 'F', '\0' };
@@ -65,7 +63,7 @@ bool IsSharedObject(const std::string &FN) {
/// FileOpenable - Returns true IFF Filename names an existing regular
/// file which we can successfully open.
///
-bool FileOpenable (const std::string &Filename) {
+bool llvm::FileOpenable(const std::string &Filename) {
struct stat s;
if (stat (Filename.c_str (), &s) == -1)
return false; // Cannot stat file
@@ -83,8 +81,8 @@ bool FileOpenable (const std::string &Filename) {
/// occurs, allowing the caller to distinguish between a failed diff and a file
/// system error.
///
-bool DiffFiles(const std::string &FileA, const std::string &FileB,
- std::string *Error) {
+bool llvm::DiffFiles(const std::string &FileA, const std::string &FileB,
+ std::string *Error) {
std::ifstream FileAStream(FileA.c_str());
if (!FileAStream) {
if (Error) *Error = "Couldn't open file '" + FileA + "'";
@@ -113,7 +111,8 @@ bool DiffFiles(const std::string &FileA, const std::string &FileB,
/// or if Old does not exist, move the New file over the Old file. Otherwise,
/// remove the New file.
///
-void MoveFileOverIfUpdated(const std::string &New, const std::string &Old) {
+void llvm::MoveFileOverIfUpdated(const std::string &New,
+ const std::string &Old) {
if (DiffFiles(New, Old)) {
if (std::rename(New.c_str(), Old.c_str()))
std::cerr << "Error renaming '" << New << "' to '" << Old << "'!\n";
@@ -124,7 +123,7 @@ void MoveFileOverIfUpdated(const std::string &New, const std::string &Old) {
/// removeFile - Delete the specified file
///
-void removeFile(const std::string &Filename) {
+void llvm::removeFile(const std::string &Filename) {
std::remove(Filename.c_str());
}
@@ -132,7 +131,7 @@ void removeFile(const std::string &Filename) {
/// file does not exist yet, return it, otherwise add a suffix to make it
/// unique.
///
-std::string getUniqueFilename(const std::string &FilenameBase) {
+std::string llvm::getUniqueFilename(const std::string &FilenameBase) {
if (!std::ifstream(FilenameBase.c_str()))
return FilenameBase; // Couldn't open the file? Use it!
@@ -183,8 +182,8 @@ static bool AddPermissionsBits (const std::string &Filename, mode_t bits) {
/// umask would allow. Filename must name an existing file or
/// directory. Returns true on success, false on error.
///
-bool MakeFileExecutable (const std::string &Filename) {
- return AddPermissionsBits (Filename, 0111);
+bool llvm::MakeFileExecutable(const std::string &Filename) {
+ return AddPermissionsBits(Filename, 0111);
}
/// MakeFileReadable - Make the file named Filename readable by
@@ -192,8 +191,6 @@ bool MakeFileExecutable (const std::string &Filename) {
/// umask would allow. Filename must name an existing file or
/// directory. Returns true on success, false on error.
///
-bool MakeFileReadable (const std::string &Filename) {
- return AddPermissionsBits (Filename, 0444);
+bool llvm::MakeFileReadable(const std::string &Filename) {
+ return AddPermissionsBits(Filename, 0444);
}
-
-} // End llvm namespace
diff --git a/lib/Support/LeakDetector.cpp b/lib/Support/LeakDetector.cpp
index ffb081a998..f0cb6cc1c5 100644
--- a/lib/Support/LeakDetector.cpp
+++ b/lib/Support/LeakDetector.cpp
@@ -14,8 +14,7 @@
#include "Support/LeakDetector.h"
#include "llvm/Value.h"
#include <set>
-
-namespace llvm {
+using namespace llvm;
// Lazily allocate set so that release build doesn't have to do anything.
static std::set<const void*> *Objects = 0;
@@ -89,5 +88,3 @@ void LeakDetector::checkForGarbageImpl(const std::string &Message) {
Objects = 0; LLVMObjects = 0;
}
}
-
-} // End llvm namespace
diff --git a/lib/Support/Mangler.cpp b/lib/Support/Mangler.cpp
index 567fe05e32..699ecd1a65 100644
--- a/lib/Support/Mangler.cpp
+++ b/lib/Support/Mangler.cpp
@@ -15,8 +15,7 @@
#include "llvm/Module.h"
#include "llvm/Type.h"
#include "Support/StringExtras.h"
-
-namespace llvm {
+using namespace llvm;
static char HexDigit(int V) {
return V < 10 ? V+'0' : V+'A'-10;
@@ -100,5 +99,3 @@ Mangler::Mangler(Module &m, bool addUnderscorePrefix)
else
FoundNames.insert(I->getName()); // Otherwise, keep track of name
}
-
-} // End llvm namespace
diff --git a/lib/Support/PluginLoader.cpp b/lib/Support/PluginLoader.cpp
index 1729bb3365..be8833d009 100644
--- a/lib/Support/PluginLoader.cpp
+++ b/lib/Support/PluginLoader.cpp
@@ -22,8 +22,7 @@
#include "Config/dlfcn.h"
#include "Config/link.h"
#include <iostream>
-
-namespace llvm {
+using namespace llvm;
namespace {
struct PluginLoader {
@@ -40,5 +39,3 @@ namespace {
static cl::opt<PluginLoader, false, cl::parser<std::string> >
LoadOpt("load", cl::ZeroOrMore, cl::value_desc("plugin.so"),
cl::desc("Load the specified plugin"));
-
-} // End llvm namespace
diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp
index 73decfd89b..27e3eb80e5 100644
--- a/lib/Support/Signals.cpp
+++ b/lib/Support/Signals.cpp
@@ -19,8 +19,7 @@
#include <cstdio>
#include <signal.h>
#include "Config/config.h" // Get the signal handler return type
-
-namespace llvm {
+using namespace llvm;
static std::vector<std::string> FilesToRemove;
@@ -58,11 +57,9 @@ static RETSIGTYPE SignalHandler(int Sig) {
static void RegisterHandler(int Signal) { signal(Signal, SignalHandler); }
// RemoveFileOnSignal - The public API
-void RemoveFileOnSignal(const std::string &Filename) {
+void llvm::RemoveFileOnSignal(const std::string &Filename) {
FilesToRemove.push_back(Filename);
std::for_each(IntSigs, IntSigsEnd, RegisterHandler);
std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
}
-
-} // End llvm namespace
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp
index ec535ad45a..e1a0bd04d4 100644
--- a/lib/Support/SystemUtils.cpp
+++ b/lib/Support/SystemUtils.cpp
@@ -23,13 +23,12 @@
#include "Config/sys/wait.h"
#include "Config/unistd.h"
#include "Config/errno.h"
-
-namespace llvm {
+using namespace llvm;
/// isExecutableFile - This function returns true if the filename specified
/// exists and is executable.
///
-bool isExecutableFile(const std::string &ExeFileName) {
+bool llvm::isExecutableFile(const std::string &ExeFileName) {
struct stat Buf;
if (stat(ExeFileName.c_str(), &Buf))
return false; // Must not be executable!
@@ -51,8 +50,8 @@ bool isExecutableFile(const std::string &ExeFileName) {
/// directory, nor in the PATH. If the executable cannot be found, return an
/// empty string.
///
-std::string FindExecutable(const std::string &ExeName,
- const std::string &ProgramPath) {
+std::string llvm::FindExecutable(const std::string &ExeName,
+ const std::string &ProgramPath) {
// First check the directory that bugpoint is in. We can do this if
// BugPointPath contains at least one / character, indicating that it is a
// relative path to bugpoint itself.
@@ -116,11 +115,11 @@ static void RedirectFD(const std::string &File, int FD) {
/// the calling program if there is an error executing the specified program.
/// It returns the return value of the program, or -1 if a timeout is detected.
///
-int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args,
- const std::string &StdInFile,
- const std::string &StdOutFile,
- const std::string &StdErrFile) {
-
+int llvm::RunProgramWithTimeout(const std::string &ProgramPath,
+ const char **Args,
+ const std::string &StdInFile,
+ const std::string &StdOutFile,
+ const std::string &StdErrFile) {
// FIXME: install sigalarm handler here for timeout...
int Child = fork();
@@ -204,9 +203,8 @@ int RunProgramWithTimeout(const std::string &ProgramPath, const char **Args,
//
// This function does not use $PATH to find programs.
//
-int
-ExecWait (const char * const old_argv[], const char * const old_envp[])
-{
+int llvm::ExecWait(const char * const old_argv[],
+ const char * const old_envp[]) {
// Child process ID
register int child;
@@ -273,5 +271,3 @@ ExecWait (const char * const old_argv[], const char * const old_envp[])
//
return 1;
}
-
-} // End llvm namespace
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
diff --git a/lib/Support/ValueHolder.cpp b/lib/Support/ValueHolder.cpp
index 77fdaf6b44..976f825598 100644
--- a/lib/Support/ValueHolder.cpp
+++ b/lib/Support/ValueHolder.cpp
@@ -18,10 +18,8 @@
#include "llvm/Support/ValueHolder.h"
#include "llvm/Type.h"
-namespace llvm {
+using namespace llvm;
ValueHolder::ValueHolder(Value *V) : User(Type::TypeTy, Value::TypeVal) {
Operands.push_back(Use(V, this));
}
-
-} // End llvm namespace
diff --git a/lib/VMCore/ConstantRange.cpp b/lib/VMCore/ConstantRange.cpp
index e180f12a1a..7b45d20b53 100644
--- a/lib/VMCore/ConstantRange.cpp
+++ b/lib/VMCore/ConstantRange.cpp
@@ -25,8 +25,7 @@
#include "llvm/Type.h"
#include "llvm/Instruction.h"
#include "llvm/ConstantHandling.h"
-
-namespace llvm {
+using namespace llvm;
/// Initialize a full (the default) or empty set for the specified type.
///
@@ -250,5 +249,3 @@ void ConstantRange::print(std::ostream &OS) const {
void ConstantRange::dump() const {
print(std::cerr);
}
-
-} // End llvm namespace
diff --git a/lib/VMCore/LeakDetector.cpp b/lib/VMCore/LeakDetector.cpp
index ffb081a998..f0cb6cc1c5 100644
--- a/lib/VMCore/LeakDetector.cpp
+++ b/lib/VMCore/LeakDetector.cpp
@@ -14,8 +14,7 @@
#include "Support/LeakDetector.h"
#include "llvm/Value.h"
#include <set>
-
-namespace llvm {
+using namespace llvm;
// Lazily allocate set so that release build doesn't have to do anything.
static std::set<const void*> *Objects = 0;
@@ -89,5 +88,3 @@ void LeakDetector::checkForGarbageImpl(const std::string &Message) {
Objects = 0; LLVMObjects = 0;
}
}
-
-} // End llvm namespace
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp
index 567fe05e32..699ecd1a65 100644
--- a/lib/VMCore/Mangler.cpp
+++ b/lib/VMCore/Mangler.cpp
@@ -15,8 +15,7 @@
#include "llvm/Module.h"
#include "llvm/Type.h"
#include "Support/StringExtras.h"
-
-namespace llvm {
+using namespace llvm;
static char HexDigit(int V) {
return V < 10 ? V+'0' : V+'A'-10;
@@ -100,5 +99,3 @@ Mangler::Mangler(Module &m, bool addUnderscorePrefix)
else
FoundNames.insert(I->getName()); // Otherwise, keep track of name
}
-
-} // End llvm namespace
diff --git a/tools/bugpoint/ToolRunner.cpp b/tools/bugpoint/ToolRunner.cpp
index 0f2e13e20f..b1fb64b990 100644
--- a/tools/bugpoint/ToolRunner.cpp
+++ b/tools/bugpoint/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