summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'unittests')
-rw-r--r--unittests/CodeGen/MachineInstrTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/CodeGen/MachineInstrTest.cpp b/unittests/CodeGen/MachineInstrTest.cpp
index fe8e792412f..aca640ebcf3 100644
--- a/unittests/CodeGen/MachineInstrTest.cpp
+++ b/unittests/CodeGen/MachineInstrTest.cpp
@@ -91,8 +91,9 @@ std::unique_ptr<MachineFunction> createMachineFunction() {
auto TM = createTargetMachine();
unsigned FunctionNum = 42;
MachineModuleInfo MMI(TM.get());
+ const TargetSubtargetInfo &STI = *TM->getSubtargetImpl(*F);
- return llvm::make_unique<MachineFunction>(F, *TM, FunctionNum, MMI);
+ return llvm::make_unique<MachineFunction>(*F, *TM, STI, FunctionNum, MMI);
}
// This test makes sure that MachineInstr::isIdenticalTo handles Defs correctly