lookupTarget no longer takes a Module.

And we need to get TargetData from the module if the Target
doesn't have it.
This commit is contained in:
Benjamin Kramer
2009-08-04 12:21:59 +02:00
parent 5b84e64f6c
commit e05d3d8c3a
2 changed files with 5 additions and 2 deletions

View File

@@ -486,7 +486,7 @@ LDC_TARGETS
#if LLVM_REV < 77946
std::auto_ptr<llvm::TargetMachine> target(theTarget->createTargetMachine(mod, FeaturesStr));
#else
std::auto_ptr<llvm::TargetMachine> target(theTarget->createTargetMachine(mod, mod.getTargetTriple(), FeaturesStr));
std::auto_ptr<llvm::TargetMachine> target(theTarget->createTargetMachine(mod.getTargetTriple(), FeaturesStr));
#endif
assert(target.get() && "Could not allocate target machine!");
gTargetMachine = target.get();