# HG changeset patch # User Benjamin Kramer # Date 1248787581 -7200 # Node ID 08c8ef491c97da4a476fc58940d89c0a2f3b4e4a # Parent ed0feda76820e621201866e99f6237872d0ca313 getClosestStaticTargetForModule was replaced with lookupTarget Build fix for LLVM r77111. diff -r ed0feda76820 -r 08c8ef491c97 gen/llvmhelpers.cpp --- a/gen/llvmhelpers.cpp Mon Jul 27 11:44:01 2009 +0200 +++ b/gen/llvmhelpers.cpp Tue Jul 28 15:26:21 2009 +0200 @@ -1,6 +1,5 @@ #include "gen/llvmhelpers.h" #include "gen/llvm.h" -#include "llvm/Target/TargetMachineRegistry.h" #include "mars.h" #include "init.h" diff -r ed0feda76820 -r 08c8ef491c97 gen/main.cpp --- a/gen/main.cpp Mon Jul 27 11:44:01 2009 +0200 +++ b/gen/main.cpp Tue Jul 28 15:26:21 2009 +0200 @@ -442,7 +442,7 @@ if (mArch.empty()) { std::string Err; - theTarget = llvm::TargetRegistry::getClosestStaticTargetForModule(mod, Err); + theTarget = llvm::TargetRegistry::lookupTarget(mod.getTargetTriple(), false, false, Err); if (theTarget == 0) { error("failed to auto-select target: %s, please use the -march option", Err.c_str());