mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 21:48:12 +00:00
[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
This commit is contained in:
parent
df2b898db8
commit
ae44b4328d
@ -20,9 +20,8 @@
|
|||||||
|
|
||||||
namespace exegesis {
|
namespace exegesis {
|
||||||
|
|
||||||
LLVMState::LLVMState()
|
LLVMState::LLVMState(const std::string &Triple, const std::string &CpuName)
|
||||||
: TheTriple(llvm::sys::getProcessTriple()),
|
: TheTriple(Triple), CpuName(CpuName) {
|
||||||
CpuName(llvm::sys::getHostCPUName().str()) {
|
|
||||||
std::string Error;
|
std::string Error;
|
||||||
TheTarget = llvm::TargetRegistry::lookupTarget(TheTriple, Error);
|
TheTarget = llvm::TargetRegistry::lookupTarget(TheTriple, Error);
|
||||||
assert(TheTarget && "unknown target for host");
|
assert(TheTarget && "unknown target for host");
|
||||||
@ -33,6 +32,10 @@ LLVMState::LLVMState()
|
|||||||
AsmInfo.reset(TheTarget->createMCAsmInfo(*RegInfo, TheTriple));
|
AsmInfo.reset(TheTarget->createMCAsmInfo(*RegInfo, TheTriple));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMState::LLVMState()
|
||||||
|
: LLVMState(llvm::sys::getProcessTriple(),
|
||||||
|
llvm::sys::getHostCPUName().str()) {}
|
||||||
|
|
||||||
std::unique_ptr<llvm::LLVMTargetMachine>
|
std::unique_ptr<llvm::LLVMTargetMachine>
|
||||||
LLVMState::createTargetMachine() const {
|
LLVMState::createTargetMachine() const {
|
||||||
const llvm::TargetOptions Options;
|
const llvm::TargetOptions Options;
|
||||||
|
@ -32,6 +32,9 @@ class LLVMState {
|
|||||||
public:
|
public:
|
||||||
LLVMState();
|
LLVMState();
|
||||||
|
|
||||||
|
LLVMState(const std::string &Triple,
|
||||||
|
const std::string &CpuName); // For tests.
|
||||||
|
|
||||||
llvm::StringRef getTriple() const { return TheTriple; }
|
llvm::StringRef getTriple() const { return TheTriple; }
|
||||||
llvm::StringRef getCpuName() const { return CpuName; }
|
llvm::StringRef getCpuName() const { return CpuName; }
|
||||||
llvm::StringRef getFeatures() const { return Features; }
|
llvm::StringRef getFeatures() const { return Features; }
|
||||||
|
@ -23,7 +23,8 @@ namespace {
|
|||||||
class X86SnippetGeneratorTest : public ::testing::Test {
|
class X86SnippetGeneratorTest : public ::testing::Test {
|
||||||
protected:
|
protected:
|
||||||
X86SnippetGeneratorTest()
|
X86SnippetGeneratorTest()
|
||||||
: MCInstrInfo(State.getInstrInfo()), MCRegisterInfo(State.getRegInfo()) {}
|
: State("x86_64-unknown-linux", "haswell"),
|
||||||
|
MCInstrInfo(State.getInstrInfo()), MCRegisterInfo(State.getRegInfo()) {}
|
||||||
|
|
||||||
static void SetUpTestCase() {
|
static void SetUpTestCase() {
|
||||||
LLVMInitializeX86TargetInfo();
|
LLVMInitializeX86TargetInfo();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user