summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-14 04:32:55 +0000
committerChris Lattner <sabre@nondot.org>2001-09-14 04:32:55 +0000
commitf8464e4b8d676bf1aa9d4b27de820a15578b81d5 (patch)
tree28ebe4ca89dd177fa6b7fc101a3a29f3beab3b80 /llvm/tools
parentdce33dfa4b87ce5058cdf93b9aa3c0c20156cf00 (diff)
downloadbcm5719-llvm-f8464e4b8d676bf1aa9d4b27de820a15578b81d5.tar.gz
bcm5719-llvm-f8464e4b8d676bf1aa9d4b27de820a15578b81d5.zip
Checkin changes to:
1. Clean up the TargetMachine structure. No more wierd pointers that have to be cast around and taken care of by the target. 2. Instruction Scheduling now takes the schedinfo as an argument. The same should be done with the instinfo, it just isn't now. llvm-svn: 565
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llc/llc.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp
index e1a4905edcb..fb5c1fc9456 100644
--- a/llvm/tools/llc/llc.cpp
+++ b/llvm/tools/llc/llc.cpp
@@ -8,6 +8,7 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Optimizations/Normalize.h"
#include "llvm/CodeGen/Sparc.h"
+#include "llvm/CodeGen/TargetMachine.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Module.h"
#include "llvm/Method.h"
@@ -42,7 +43,7 @@ static bool CompileModule(Module *M, TargetMachine &Target) {
int main(int argc, char** argv) {
cl::ParseCommandLineOptions(argc, argv, " llvm system compiler\n");
- UltraSparc Target;
+ TargetMachine *Target = allocateSparcTargetMachine();
Module *module = ParseBytecodeFile(InputFilename);
if (module == 0) {
@@ -50,7 +51,7 @@ int main(int argc, char** argv) {
return 1;
}
- if (CompileModule(module, Target)) {
+ if (CompileModule(module, *Target)) {
cerr << "Error compiling " << InputFilename << "!\n";
delete module;
return 1;
@@ -58,6 +59,7 @@ int main(int argc, char** argv) {
// Clean up and exit
delete module;
+ delete Target;
return 0;
}
OpenPOWER on IntegriCloud