Skip to content

Commit bc983ff

Browse files
committed
Clang format.
1 parent 2a88564 commit bc983ff

File tree

23 files changed

+85
-97
lines changed

23 files changed

+85
-97
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,9 +1053,9 @@ Expected<StringRef> compileModule(Module &M, OffloadKind Kind) {
10531053
auto OS = std::make_unique<llvm::raw_fd_ostream>(FD, true);
10541054

10551055
legacy::PassManager CodeGenPasses;
1056-
MCContext MCCtx(
1057-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
1058-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
1056+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
1057+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
1058+
&TM->Options.MCOptions, false);
10591059
auto MMI = TM->createMachineModuleInfo(MCCtx);
10601060
TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple()));
10611061
CodeGenPasses.add(new TargetLibraryInfoWrapperPass(TLII));

llvm/include/llvm/CodeGen/MachineModuleInfo.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ class MachineModuleInfo {
105105
MachineFunction *LastResult = nullptr; ///< Used for shortcut/cache.
106106

107107
public:
108-
explicit MachineModuleInfo(const LLVMTargetMachine &TM,
109-
MCContext &Context);
108+
explicit MachineModuleInfo(const LLVMTargetMachine &TM, MCContext &Context);
110109

111110
/// Deleted copy constructor
112111
MachineModuleInfo(MachineModuleInfo &MMI) = delete;
@@ -121,12 +120,8 @@ class MachineModuleInfo {
121120

122121
const LLVMTargetMachine &getTarget() const { return TM; }
123122

124-
const MCContext &getContext() const {
125-
return Context;
126-
}
127-
MCContext &getContext() {
128-
return Context;
129-
}
123+
const MCContext &getContext() const { return Context; }
124+
MCContext &getContext() { return Context; }
130125

131126
const Module *getModule() const { return TheModule; }
132127

llvm/lib/ExecutionEngine/Orc/CompileUtils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ Expected<SimpleCompiler::CompileResult> SimpleCompiler::operator()(Module &M) {
4747
raw_svector_ostream ObjStream(ObjBufferSV);
4848

4949
legacy::PassManager PM;
50-
MCContext MCCtx(
51-
TM.getTargetTriple(), TM.getMCAsmInfo(), TM.getMCRegisterInfo(),
52-
TM.getMCSubtargetInfo(), nullptr, &TM.Options.MCOptions, false);
50+
MCContext MCCtx(TM.getTargetTriple(), TM.getMCAsmInfo(),
51+
TM.getMCRegisterInfo(), TM.getMCSubtargetInfo(), nullptr,
52+
&TM.Options.MCOptions, false);
5353
auto MMI = TM.createMachineModuleInfo(MCCtx);
5454
if (TM.addPassesToEmitMC(PM, ObjStream, *MMI))
5555
return make_error<StringError>("Target does not support MC emission",

llvm/lib/LTO/LTOBackend.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,14 @@ static void codegen(const Config &Conf, TargetMachine *TM,
426426
if (Conf.PreCodeGenPassesHook)
427427
Conf.PreCodeGenPassesHook(CodeGenPasses);
428428

429-
MCContext MCCtx(
430-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
431-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
429+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
430+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
431+
&TM->Options.MCOptions, false);
432432
auto MMI = TM->createMachineModuleInfo(MCCtx);
433433

434434
if (TM->addPassesToEmitFile(CodeGenPasses, *Stream->OS,
435-
DwoOut ? &DwoOut->os() : nullptr,
436-
Conf.CGFileType, *MMI))
435+
DwoOut ? &DwoOut->os() : nullptr, Conf.CGFileType,
436+
*MMI))
437437
report_fatal_error("Failed to setup codegen");
438438
CodeGenPasses.run(Mod);
439439

llvm/lib/LTO/ThinLTOCodeGenerator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#include "llvm/Config/llvm-config.h"
2929
#include "llvm/IR/DebugInfo.h"
3030
#include "llvm/IR/DiagnosticPrinter.h"
31-
#include "llvm/IR/LegacyPassManager.h"
3231
#include "llvm/IR/LLVMContext.h"
3332
#include "llvm/IR/LLVMRemarkStreamer.h"
33+
#include "llvm/IR/LegacyPassManager.h"
3434
#include "llvm/IR/Mangler.h"
3535
#include "llvm/IR/PassTimingInfo.h"
3636
#include "llvm/IR/Verifier.h"
@@ -337,9 +337,9 @@ std::unique_ptr<MemoryBuffer> codegenModule(Module &TheModule,
337337
raw_svector_ostream OS(OutputBuffer);
338338
legacy::PassManager PM;
339339

340-
MCContext MCCtx(
341-
TM.getTargetTriple(), TM.getMCAsmInfo(), TM.getMCRegisterInfo(),
342-
TM.getMCSubtargetInfo(), nullptr, &TM.Options.MCOptions, false);
340+
MCContext MCCtx(TM.getTargetTriple(), TM.getMCAsmInfo(),
341+
TM.getMCRegisterInfo(), TM.getMCSubtargetInfo(), nullptr,
342+
&TM.Options.MCOptions, false);
343343
auto MMI = TM.createMachineModuleInfo(MCCtx);
344344
// Setup the codegen now.
345345
if (TM.addPassesToEmitFile(PM, OS, nullptr, CodeGenFileType::ObjectFile,

llvm/lib/Target/TargetMachineC.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ static LLVMBool LLVMTargetMachineEmit(LLVMTargetMachineRef T, LLVMModuleRef M,
312312
break;
313313
}
314314

315-
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
316-
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
317-
&TM->Options.MCOptions, false);
318-
auto MMI = TM->createMachineModuleInfo(MCCtx);
315+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
316+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
317+
&TM->Options.MCOptions, false);
318+
auto MMI = TM->createMachineModuleInfo(MCCtx);
319319

320320
if (TM->addPassesToEmitFile(pass, OS, nullptr, ft, *MMI)) {
321321
error = "TargetMachine can't emit a file of this type";

llvm/tools/llc/NewPMDriver.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,9 @@ int llvm::compileModuleWithNewPM(
108108
Opt.DebugPM = DebugPM;
109109
Opt.RegAlloc = RegAlloc;
110110

111-
llvm::MCContext MCCtx(
112-
LLVMTM.getTargetTriple(), LLVMTM.getMCAsmInfo(),
113-
LLVMTM.getMCRegisterInfo(), LLVMTM.getMCSubtargetInfo(),
114-
nullptr, &LLVMTM.Options.MCOptions, false);
111+
llvm::MCContext MCCtx(LLVMTM.getTargetTriple(), LLVMTM.getMCAsmInfo(),
112+
LLVMTM.getMCRegisterInfo(), LLVMTM.getMCSubtargetInfo(),
113+
nullptr, &LLVMTM.Options.MCOptions, false);
115114
MachineModuleInfo MMI(LLVMTM, MCCtx);
116115

117116
PassInstrumentationCallbacks PIC;

llvm/tools/llvm-exegesis/lib/Assembler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ BitVector getFunctionReservedRegs(const TargetMachine &TM) {
239239
LLVMTM.getMCRegisterInfo(), LLVMTM.getMCSubtargetInfo(), nullptr,
240240
&LLVMTM.Options.MCOptions, false);
241241
auto MMI = std::make_unique<llvm::MachineModuleInfo>(LLVMTM, *MCCtx);
242-
MachineFunction &MF = createVoidVoidPtrMachineFunction(
243-
FunctionID, Module.get(), MMI.get());
242+
MachineFunction &MF =
243+
createVoidVoidPtrMachineFunction(FunctionID, Module.get(), MMI.get());
244244
// Saving reserved registers for client.
245245
return MF.getSubtarget().getRegisterInfo()->getReservedRegs(MF);
246246
}

llvm/tools/llvm-isel-fuzzer/llvm-isel-fuzzer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
9898

9999
// Build up a PM to do instruction selection.
100100
legacy::PassManager PM;
101-
MCContext MCCtx(
102-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
103-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
101+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
102+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
103+
&TM->Options.MCOptions, false);
104104
auto MMI = TM->createMachineModuleInfo(MCCtx);
105105
TargetLibraryInfoImpl TLII(TM->getTargetTriple());
106106
PM.add(new TargetLibraryInfoWrapperPass(TLII));

llvm/tools/llvm-reduce/ReducerWorkItem.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,7 @@ void ReducerWorkItem::writeBitcode(raw_ostream &OutStream) const {
785785

786786
std::pair<std::unique_ptr<ReducerWorkItem>, bool>
787787
llvm::parseReducerWorkItem(StringRef ToolName, StringRef Filename,
788-
LLVMContext &Ctxt,
789-
std::unique_ptr<MCContext> &MCCtx,
788+
LLVMContext &Ctxt, std::unique_ptr<MCContext> &MCCtx,
790789
std::unique_ptr<TargetMachine> &TM, bool IsMIR) {
791790
bool IsBitcode = false;
792791
Triple TheTriple;
@@ -825,8 +824,7 @@ llvm::parseReducerWorkItem(StringRef ToolName, StringRef Filename,
825824
std::unique_ptr<Module> M = MParser->parseIRModule(SetDataLayout);
826825
LLVMTargetMachine *LLVMTM = static_cast<LLVMTargetMachine *>(TM.get());
827826

828-
MCCtx.reset(new MCContext(LLVMTM->getTargetTriple(),
829-
LLVMTM->getMCAsmInfo(),
827+
MCCtx.reset(new MCContext(LLVMTM->getTargetTriple(), LLVMTM->getMCAsmInfo(),
830828
LLVMTM->getMCRegisterInfo(),
831829
LLVMTM->getMCSubtargetInfo(), nullptr,
832830
&LLVMTM->Options.MCOptions, false));

llvm/tools/llvm-reduce/ReducerWorkItem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class ReducerWorkItem {
4646
void print(raw_ostream &ROS, void *p = nullptr) const;
4747
bool verify(raw_fd_ostream *OS) const;
4848
std::unique_ptr<ReducerWorkItem> clone(const TargetMachine *TM,
49-
MCContext * MCCtx) const;
49+
MCContext *MCCtx) const;
5050

5151
/// Return a number to indicate whether there was any reduction progress.
5252
uint64_t getComplexityScore() const {

llvm/tools/llvm-reduce/TestRunner.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class TestRunner {
4545

4646
const TargetMachine *getTargetMachine() const { return TM.get(); }
4747

48-
MCContext *getMCContext() const { return MCCtx.get();}
48+
MCContext *getMCContext() const { return MCCtx.get(); }
4949

5050
StringRef getToolName() const { return ToolName; }
5151

llvm/tools/llvm-reduce/deltas/Delta.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void llvm::runDeltaPass(TestRunner &Test, ReductionFunc ExtractChunksFromModule,
198198
std::vector<Chunk> NoChunks = {{0, INT_MAX}};
199199
Oracle NoChunksCounter(NoChunks);
200200
std::unique_ptr<ReducerWorkItem> Clone =
201-
Test.getProgram().clone(Test.getTargetMachine(), Test.getMCContext());
201+
Test.getProgram().clone(Test.getTargetMachine(), Test.getMCContext());
202202
ExtractChunksFromModule(NoChunksCounter, *Clone);
203203
assert(Targets == NoChunksCounter.count() &&
204204
"number of chunks changes when reducing");

llvm/unittests/CodeGen/GlobalISel/GISelMITest.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ class GISelMITest : public ::testing::Test {
123123
SmallString<512> MIRString;
124124
getTargetTestModuleString(MIRString, ExtraAssembly);
125125

126-
ModuleMMIPair =
127-
createDummyModule(Context, *TM, *MCCtx, MIRString, "func");
126+
ModuleMMIPair = createDummyModule(Context, *TM, *MCCtx, MIRString, "func");
128127
MF = getMFFromMMI(ModuleMMIPair.first.get(), ModuleMMIPair.second.get());
129128
collectCopies(Copies, MF);
130129
EntryMBB = &*MF->begin();

llvm/unittests/CodeGen/MFCommon.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ std::unique_ptr<MachineFunction> createMachineFunction(LLVMContext &Ctx,
132132

133133
auto TM = createTargetMachine();
134134
unsigned FunctionNum = 42;
135-
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
136-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
135+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
136+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
137+
&TM->Options.MCOptions, false);
137138
MachineModuleInfo MMI(*TM, MCCtx);
138139
const TargetSubtargetInfo &STI = *TM->getSubtargetImpl(*F);
139140

140-
return std::make_unique<MachineFunction>(*F, *TM, STI, MCCtx,
141-
FunctionNum);
141+
return std::make_unique<MachineFunction>(*F, *TM, STI, MCCtx, FunctionNum);
142142
}
143143

llvm/unittests/CodeGen/PassManagerTest.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,9 @@ TEST_F(PassManagerTest, Basic) {
181181

182182
LLVMTargetMachine *LLVMTM = static_cast<LLVMTargetMachine *>(TM.get());
183183
M->setDataLayout(TM->createDataLayout());
184-
MCContext MCCtx(
185-
LLVMTM->getTargetTriple(), LLVMTM->getMCAsmInfo(),
186-
LLVMTM->getMCRegisterInfo(), LLVMTM->getMCSubtargetInfo(), nullptr,
187-
&LLVMTM->Options.MCOptions, false);
184+
MCContext MCCtx(LLVMTM->getTargetTriple(), LLVMTM->getMCAsmInfo(),
185+
LLVMTM->getMCRegisterInfo(), LLVMTM->getMCSubtargetInfo(),
186+
nullptr, &LLVMTM->Options.MCOptions, false);
188187

189188
MachineModuleInfo MMI(*LLVMTM, MCCtx);
190189

@@ -236,10 +235,9 @@ TEST_F(PassManagerTest, DiagnosticHandler) {
236235
LLVMTargetMachine *LLVMTM = static_cast<LLVMTargetMachine *>(TM.get());
237236
M->setDataLayout(TM->createDataLayout());
238237

239-
MCContext MCCtx(
240-
LLVMTM->getTargetTriple(), LLVMTM->getMCAsmInfo(),
241-
LLVMTM->getMCRegisterInfo(), LLVMTM->getMCSubtargetInfo(), nullptr,
242-
&LLVMTM->Options.MCOptions, false);
238+
MCContext MCCtx(LLVMTM->getTargetTriple(), LLVMTM->getMCAsmInfo(),
239+
LLVMTM->getMCRegisterInfo(), LLVMTM->getMCSubtargetInfo(),
240+
nullptr, &LLVMTM->Options.MCOptions, false);
243241
MachineModuleInfo MMI(*LLVMTM, MCCtx);
244242

245243
LoopAnalysisManager LAM;

llvm/unittests/MI/LiveIntervalTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ static void doTest(StringRef MIRFunc,
204204
LLVMContext Context;
205205
std::unique_ptr<LLVMTargetMachine> TM = createTargetMachine();
206206
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
207-
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(),
208-
nullptr, &TM->Options.MCOptions, false);
207+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
208+
&TM->Options.MCOptions, false);
209209
// This test is designed for the X86 backend; stop if it is not available.
210210
if (!TM)
211211
return;

llvm/unittests/MIR/MachineMetadata.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ body: |
225225
%1:gpr32 = LDRWui %0, 0 :: (load (s32) from %ir.p)
226226
...
227227
)MIR";
228-
MCContext MCCtx(
229-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
230-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
228+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
229+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
230+
&TM->Options.MCOptions, false);
231231
MachineModuleInfo MMI(*TM, MCCtx);
232232
M = parseMIR(*TM, MIRString, MMI);
233233
ASSERT_TRUE(M);
@@ -339,9 +339,9 @@ body: |
339339
...
340340
)MIR";
341341

342-
MCContext MCCtx(
343-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
344-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
342+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
343+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
344+
&TM->Options.MCOptions, false);
345345
MachineModuleInfo MMI(*TM, MCCtx);
346346
M = parseMIR(*TM, MIRString, MMI);
347347
ASSERT_TRUE(M);
@@ -380,9 +380,9 @@ body: |
380380
...
381381
)MIR";
382382

383-
MCContext MCCtx(
384-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
385-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
383+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
384+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
385+
&TM->Options.MCOptions, false);
386386
MachineModuleInfo MMI(*TM, MCCtx);
387387
M = parseMIR(*TM, MIRString, MMI);
388388
ASSERT_TRUE(M);
@@ -481,9 +481,9 @@ body: |
481481
...
482482
)MIR";
483483

484-
MCContext MCCtx(
485-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
486-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
484+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
485+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
486+
&TM->Options.MCOptions, false);
487487
MachineModuleInfo MMI(*TM, MCCtx);
488488
M = parseMIR(*TM, MIRString, MMI);
489489
ASSERT_TRUE(M);
@@ -573,9 +573,9 @@ body: |
573573
574574
...
575575
)MIR";
576-
MCContext MCCtx(
577-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
578-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
576+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
577+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
578+
&TM->Options.MCOptions, false);
579579
MachineModuleInfo MMI(*TM, MCCtx);
580580
M = parseMIR(*TM, MIRString, MMI);
581581
ASSERT_TRUE(M);
@@ -607,9 +607,9 @@ body: |
607607
608608
...
609609
)MIR";
610-
MCContext MCCtx(
611-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
612-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
610+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
611+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
612+
&TM->Options.MCOptions, false);
613613
MachineModuleInfo MMI(*TM, MCCtx);
614614
M = parseMIR(*TM, MIRString, MMI);
615615
ASSERT_TRUE(M);

llvm/unittests/Target/AArch64/InstSizes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ void runChecks(
7474
M->setTargetTriple(TM->getTargetTriple().getTriple());
7575
M->setDataLayout(TM->createDataLayout());
7676

77-
MCContext MCCtx(
78-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
79-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
77+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
78+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
79+
&TM->Options.MCOptions, false);
8080
MachineModuleInfo MMI(*TM, MCCtx);
8181
bool Res = MParser->parseMachineFunctions(*M, MMI);
8282
ASSERT_FALSE(Res);

llvm/unittests/Target/AMDGPU/ExecMayBeModifiedBeforeAnyUse.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,10 @@ TEST(AMDGPU, ExecMayBeModifiedBeforeAnyUse) {
2828
auto *Type = FunctionType::get(Type::getVoidTy(Ctx), false);
2929
auto *F = Function::Create(Type, GlobalValue::ExternalLinkage, "Test", &Mod);
3030

31-
MCContext MCCtx(
32-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
33-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
34-
auto MF =
35-
std::make_unique<MachineFunction>(*F, *TM, ST, MCCtx, 42);
31+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
32+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
33+
&TM->Options.MCOptions, false);
34+
auto MF = std::make_unique<MachineFunction>(*F, *TM, ST, MCCtx, 42);
3635
auto *BB = MF->CreateMachineBasicBlock();
3736
MF->push_back(BB);
3837

llvm/unittests/Target/ARM/InstSizes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ void runChecks(
2424
std::function<void(const ARMBaseInstrInfo &, MachineFunction &, unsigned &)>
2525
Checks) {
2626
LLVMContext Context;
27-
MCContext MCCtx(
28-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
29-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
27+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
28+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
29+
&TM->Options.MCOptions, false);
3030

3131
auto MIRString = "--- |\n"
3232
" declare void @sizes()\n" +

llvm/unittests/Target/LoongArch/InstSizes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ void runChecks(
7373
M->setTargetTriple(TM->getTargetTriple().getTriple());
7474
M->setDataLayout(TM->createDataLayout());
7575

76-
MCContext MCCtx(
77-
TM->getTargetTriple(), TM->getMCAsmInfo(), TM->getMCRegisterInfo(),
78-
TM->getMCSubtargetInfo(), nullptr, &TM->Options.MCOptions, false);
76+
MCContext MCCtx(TM->getTargetTriple(), TM->getMCAsmInfo(),
77+
TM->getMCRegisterInfo(), TM->getMCSubtargetInfo(), nullptr,
78+
&TM->Options.MCOptions, false);
7979

8080
MachineModuleInfo MMI(*TM, MCCtx);
8181
bool Res = MParser->parseMachineFunctions(*M, MMI);

0 commit comments

Comments
 (0)