From a31f3eb98f16d408e441e6e1bedc5e82fc5ab374 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Tue, 28 Jul 2009 15:26:21 +0200 Subject: [PATCH] getClosestStaticTargetForModule was replaced with lookupTarget Build fix for LLVM r77111. --- gen/llvmhelpers.cpp | 1 - gen/main.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 6c6730d8..28e5fe4b 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1,6 +1,5 @@ #include "gen/llvmhelpers.h" #include "gen/llvm.h" -#include "llvm/Target/TargetMachineRegistry.h" #include "mars.h" #include "init.h" diff --git a/gen/main.cpp b/gen/main.cpp index 115af784..dc52ac22 100644 --- a/gen/main.cpp +++ b/gen/main.cpp @@ -442,7 +442,7 @@ LDC_TARGETS 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());