Skip to content

Commit dd7b8f3

Browse files
committed
Fixed any files that missed the LLVMTargetMachine migration.
1 parent 7841cf4 commit dd7b8f3

24 files changed

+43
-44
lines changed

llvm/include/llvm/Target/TargetMachine.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "llvm/ADT/StringRef.h"
1717
#include "llvm/IR/DataLayout.h"
1818
#include "llvm/IR/PassManager.h"
19+
#include "llvm/MC/MCStreamer.h"
1920
#include "llvm/Support/Allocator.h"
2021
#include "llvm/Support/CodeGen.h"
2122
#include "llvm/Support/Error.h"
@@ -40,7 +41,6 @@ class MCAsmInfo;
4041
class MCContext;
4142
class MCInstrInfo;
4243
class MCRegisterInfo;
43-
class MCStreamer;
4444
class MCSubtargetInfo;
4545
class MCSymbol;
4646
class raw_pwrite_stream;

llvm/tools/llc/NewPMDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ int llvm::compileModuleWithNewPM(
156156
if (MIR->parseMachineFunctions(*M, MAM))
157157
return 1;
158158
} else {
159-
ExitOnErr(LLVMTM.buildCodeGenPipeline(
159+
ExitOnErr(Target->buildCodeGenPipeline(
160160
MPM, *OS, DwoOut ? &DwoOut->os() : nullptr, FileType, Opt, &PIC));
161161
}
162162

llvm/tools/llc/llc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
697697
delete MMIWP;
698698
return 1;
699699
}
700-
TargetPassConfig *PTPC = LLVMTM.createPassConfig(PM);
700+
TargetPassConfig *PTPC = Target->createPassConfig(PM);
701701
TargetPassConfig &TPC = *PTPC;
702702
if (TPC.hasLimitedCodeGenPipeline()) {
703703
WithColor::warning(errs(), argv[0])
@@ -725,7 +725,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
725725
reportError("target does not support generation of this file type");
726726
}
727727

728-
const_cast<TargetLoweringObjectFile *>(LLVMTM.getObjFileLowering())
728+
const_cast<TargetLoweringObjectFile *>(Target->getObjFileLowering())
729729
->Initialize(MMIWP->getMMI().getContext(), *Target);
730730
if (MIR) {
731731
assert(MMIWP && "Forgot to create MMIWP?");

llvm/unittests/CodeGen/AArch64SelectionDAGTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class AArch64SelectionDAGTest : public testing::Test {
8282
}
8383

8484
LLVMContext Context;
85-
std::unique_ptr<LLVMTargetMachine> TM;
85+
std::unique_ptr<TargetMachine> TM;
8686
std::unique_ptr<Module> M;
8787
Function *F;
8888
std::unique_ptr<MachineFunction> MF;

llvm/unittests/CodeGen/AMDGPUMetadataTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class AMDGPUSelectionDAGTest : public testing::Test {
7979
static std::string PalMDString;
8080

8181
LLVMContext Context;
82-
std::unique_ptr<LLVMTargetMachine> TM;
82+
std::unique_ptr<TargetMachine> TM;
8383
std::unique_ptr<Module> M;
8484
SmallString<1024> Elf;
8585
};

llvm/unittests/CodeGen/CCStateTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "llvm/CodeGen/CallingConvLower.h"
10+
#include "llvm/CodeGen/CodeGenCommonTMImpl.h"
1011
#include "llvm/CodeGen/MachineFunction.h"
1112
#include "llvm/CodeGen/MachineModuleInfo.h"
1213
#include "llvm/CodeGen/TargetFrameLowering.h"
@@ -16,7 +17,6 @@
1617
#include "llvm/CodeGen/TargetSubtargetInfo.h"
1718
#include "llvm/IR/Module.h"
1819
#include "llvm/MC/TargetRegistry.h"
19-
#include "llvm/Target/TargetMachine.h"
2020
#include "gtest/gtest.h"
2121

2222
using namespace llvm;

llvm/unittests/CodeGen/GlobalISel/GISelMITest.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ class GISelMITest : public ::testing::Test {
102102
protected:
103103
GISelMITest() : ::testing::Test() {}
104104

105-
/// Prepare a target specific LLVMTargetMachine.
106-
virtual std::unique_ptr<LLVMTargetMachine> createTargetMachine() const = 0;
105+
/// Prepare a target specific TargetMachine.
106+
virtual std::unique_ptr<TargetMachine> createTargetMachine() const = 0;
107107

108108
/// Get the stub sample MIR test function.
109109
virtual void getTargetTestModuleString(SmallString<512> &S,
@@ -127,7 +127,7 @@ class GISelMITest : public ::testing::Test {
127127
}
128128

129129
LLVMContext Context;
130-
std::unique_ptr<LLVMTargetMachine> TM;
130+
std::unique_ptr<TargetMachine> TM;
131131
MachineFunction *MF;
132132
std::pair<std::unique_ptr<Module>, std::unique_ptr<MachineModuleInfo>>
133133
ModuleMMIPair;
@@ -138,13 +138,13 @@ class GISelMITest : public ::testing::Test {
138138
};
139139

140140
class AArch64GISelMITest : public GISelMITest {
141-
std::unique_ptr<LLVMTargetMachine> createTargetMachine() const override;
141+
std::unique_ptr<TargetMachine> createTargetMachine() const override;
142142
void getTargetTestModuleString(SmallString<512> &S,
143143
StringRef MIRFunc) const override;
144144
};
145145

146146
class AMDGPUGISelMITest : public GISelMITest {
147-
std::unique_ptr<LLVMTargetMachine> createTargetMachine() const override;
147+
std::unique_ptr<TargetMachine> createTargetMachine() const override;
148148
void getTargetTestModuleString(SmallString<512> &S,
149149
StringRef MIRFunc) const override;
150150
};

llvm/unittests/CodeGen/InstrRefLDVTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "llvm/CodeGen/CodeGenCommonTMImpl.h"
910
#include "llvm/CodeGen/MIRParser/MIRParser.h"
1011
#include "llvm/CodeGen/MachineDominators.h"
1112
#include "llvm/CodeGen/MachineModuleInfo.h"
@@ -21,7 +22,6 @@
2122
#include "llvm/MC/TargetRegistry.h"
2223
#include "llvm/Support/MemoryBuffer.h"
2324
#include "llvm/Support/TargetSelect.h"
24-
#include "llvm/Target/TargetMachine.h"
2525
#include "llvm/Target/TargetOptions.h"
2626

2727
#include "../lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h"

llvm/unittests/CodeGen/LexicalScopesTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#include "llvm/CodeGen/CodeGenCommonTMImpl.h"
910
#include "llvm/CodeGen/LexicalScopes.h"
1011
#include "llvm/CodeGen/MachineBasicBlock.h"
1112
#include "llvm/CodeGen/MachineFunction.h"
@@ -25,7 +26,6 @@
2526
#include "llvm/MC/MCSymbol.h"
2627
#include "llvm/MC/TargetRegistry.h"
2728
#include "llvm/Support/TargetSelect.h"
28-
#include "llvm/Target/TargetMachine.h"
2929
#include "llvm/Target/TargetOptions.h"
3030

3131
#include "gtest/gtest.h"

llvm/unittests/CodeGen/MLRegAllocDevelopmentFeatures.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "../../lib/CodeGen/MLRegAllocEvictAdvisor.h"
1010
#include "llvm/Analysis/NoInferenceModelRunner.h"
11+
#include "llvm/CodeGen/CodeGenCommonTMImpl.h"
1112
#include "llvm/CodeGen/MachineBasicBlock.h"
1213
#include "llvm/CodeGen/MachineFunction.h"
1314
#include "llvm/CodeGen/MachineModuleInfo.h"
@@ -21,7 +22,6 @@
2122
#include "llvm/Support/Allocator.h"
2223
#include "llvm/Support/CodeGen.h"
2324
#include "llvm/Support/TargetSelect.h"
24-
#include "llvm/Target/TargetMachine.h"
2525
#include "llvm/Target/TargetOptions.h"
2626
#include "llvm/TargetParser/Triple.h"
2727
#include "gmock/gmock.h"

0 commit comments

Comments
 (0)