mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-24 21:05:23 +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 {
|
||||
|
||||
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<llvm::LLVMTargetMachine>
|
||||
LLVMState::createTargetMachine() const {
|
||||
const llvm::TargetOptions Options;
|
||||
|
@ -32,6 +32,9 @@ class LLVMState {
|
||||
public:
|
||||
LLVMState();
|
||||
|
||||
LLVMState(const std::string &Triple,
|
||||
const std::string &CpuName); // For tests.
|
||||
|
||||
llvm::StringRef getTriple() const { return TheTriple; }
|
||||
llvm::StringRef getCpuName() const { return CpuName; }
|
||||
llvm::StringRef getFeatures() const { return Features; }
|
||||
|
@ -23,7 +23,8 @@ namespace {
|
||||
class X86SnippetGeneratorTest : public ::testing::Test {
|
||||
protected:
|
||||
X86SnippetGeneratorTest()
|
||||
: MCInstrInfo(State.getInstrInfo()), MCRegisterInfo(State.getRegInfo()) {}
|
||||
: State("x86_64-unknown-linux", "haswell"),
|
||||
MCInstrInfo(State.getInstrInfo()), MCRegisterInfo(State.getRegInfo()) {}
|
||||
|
||||
static void SetUpTestCase() {
|
||||
LLVMInitializeX86TargetInfo();
|
||||
|
Loading…
x
Reference in New Issue
Block a user