// 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;
}
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();