From b391f2430378cd4d1bba41d04e6f60d890748f20 Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Wed, 13 Jun 2018 14:07:36 +0000 Subject: [llvm-exegesis] Fix buildbot - power was using native target for X86. Reviewers: courbet Reviewed By: courbet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48125 llvm-svn: 334601 --- llvm/tools/llvm-exegesis/lib/LlvmState.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'llvm/tools/llvm-exegesis/lib/LlvmState.cpp') diff --git a/llvm/tools/llvm-exegesis/lib/LlvmState.cpp b/llvm/tools/llvm-exegesis/lib/LlvmState.cpp index cb534f50998..e28685339e3 100644 --- a/llvm/tools/llvm-exegesis/lib/LlvmState.cpp +++ b/llvm/tools/llvm-exegesis/lib/LlvmState.cpp @@ -20,9 +20,8 @@ namespace exegesis { -LLVMState::LLVMState() - : TheTriple(llvm::sys::getProcessTriple()), - CpuName(llvm::sys::getHostCPUName().str()) { +LLVMState::LLVMState(const std::string &Triple, const std::string &CpuName) + : TheTriple(Triple), CpuName(CpuName) { std::string Error; TheTarget = llvm::TargetRegistry::lookupTarget(TheTriple, Error); assert(TheTarget && "unknown target for host"); @@ -33,6 +32,10 @@ LLVMState::LLVMState() AsmInfo.reset(TheTarget->createMCAsmInfo(*RegInfo, TheTriple)); } +LLVMState::LLVMState() + : LLVMState(llvm::sys::getProcessTriple(), + llvm::sys::getHostCPUName().str()) {} + std::unique_ptr LLVMState::createTargetMachine() const { const llvm::TargetOptions Options; -- cgit v1.2.3