mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
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:
parent
bb144a892b
commit
62c720a5bd
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user