Targets now configure themselves with the module, not flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-24 19:50:12 +00:00
parent bb144a892b
commit 62c720a5bd

View File

@ -68,7 +68,7 @@ int main(int argc, char **argv) {
// Allocate target machine. First, check whether the user has
// explicitly specified an architecture to compile for.
TargetMachine* (*TargetMachineAllocator)(unsigned) = 0;
TargetMachine* (*TargetMachineAllocator)(const Module&) = 0;
switch (Arch) {
case x86:
TargetMachineAllocator = allocateX86TargetMachine;
@ -102,7 +102,7 @@ int main(int argc, char **argv) {
}
break;
}
std::auto_ptr<TargetMachine> target((*TargetMachineAllocator)(0));
std::auto_ptr<TargetMachine> target(TargetMachineAllocator(mod));
assert(target.get() && "Could not allocate target machine!");
TargetMachine &Target = *target.get();
const TargetData &TD = Target.getTargetData();