aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-07-23 03:09:03 +0000
committerChris Lattner <sabre@nondot.org>2001-07-23 03:09:03 +0000
commit6c5a32d545f65623fcbb69937406f80e0715931a (patch)
tree67ba8a4aa48e7ca8efb7d845f2c4ddb629a84b6c /tools
parent0f68368fd8be8fb3884e1316cd261d5f5a2c80e5 (diff)
downloadexternal_llvm-6c5a32d545f65623fcbb69937406f80e0715931a.zip
external_llvm-6c5a32d545f65623fcbb69937406f80e0715931a.tar.gz
external_llvm-6c5a32d545f65623fcbb69937406f80e0715931a.tar.bz2
Removal of the redundant CompileContext wrapper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llc/llc.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp
index 1ebfb50..ab1f532 100644
--- a/tools/llc/llc.cpp
+++ b/tools/llc/llc.cpp
@@ -16,17 +16,13 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/Writer.h"
#include "llvm/CodeGen/InstrSelection.h"
-#include "llvm/LLC/CompileContext.h"
#include "llvm/CodeGen/Sparc.h"
#include "llvm/Tools/CommandLine.h"
cl::String InputFilename ("", "Input filename", cl::NoFlags, "");
cl::String OutputFilename("o", "Output filename", cl::NoFlags, "");
-
-CompileContext::~CompileContext() { delete targetMachine; }
-
-static bool CompileModule(Module *module, CompileContext& ccontext) {
+static bool CompileModule(Module *module, TargetMachine &Target) {
bool failed = false;
for (Module::MethodListType::const_iterator
@@ -36,7 +32,7 @@ static bool CompileModule(Module *module, CompileContext& ccontext) {
{
Method* method = *methodIter;
- if (SelectInstructionsForMethod(method, ccontext))
+ if (SelectInstructionsForMethod(method, Target))
{
failed = true;
cerr << "Instruction selection failed for method "
@@ -56,7 +52,7 @@ static bool CompileModule(Module *module, CompileContext& ccontext) {
int main(int argc, char** argv) {
cl::ParseCommandLineOptions(argc, argv, " llvm system compiler\n");
- CompileContext compileContext(new UltraSparc());
+ UltraSparc Target;
Module *module = ParseBytecodeFile(InputFilename.getValue());
if (module == 0) {
@@ -64,7 +60,7 @@ int main(int argc, char** argv) {
return 1;
}
- bool failure = CompileModule(module, compileContext);
+ bool failure = CompileModule(module, Target);
if (failure) {
cerr << "Error compiling "