getClosestStaticTargetForModule was replaced with lookupTarget

Build fix for LLVM r77111.
This commit is contained in:
Benjamin Kramer 2009-07-28 15:26:21 +02:00
parent 27a9f93767
commit a31f3eb98f
2 changed files with 1 additions and 2 deletions

View file

@ -1,6 +1,5 @@
#include "gen/llvmhelpers.h" #include "gen/llvmhelpers.h"
#include "gen/llvm.h" #include "gen/llvm.h"
#include "llvm/Target/TargetMachineRegistry.h"
#include "mars.h" #include "mars.h"
#include "init.h" #include "init.h"

View file

@ -442,7 +442,7 @@ LDC_TARGETS
if (mArch.empty()) if (mArch.empty())
{ {
std::string Err; std::string Err;
theTarget = llvm::TargetRegistry::getClosestStaticTargetForModule(mod, Err); theTarget = llvm::TargetRegistry::lookupTarget(mod.getTargetTriple(), false, false, Err);
if (theTarget == 0) if (theTarget == 0)
{ {
error("failed to auto-select target: %s, please use the -march option", Err.c_str()); error("failed to auto-select target: %s, please use the -march option", Err.c_str());