summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-12-15 22:22:46 +0000
committerMatthias Braun <matze@braunis.de>2017-12-15 22:22:46 +0000
commitdfcb4f534480ecf3bc64c11781fa2d3123737e91 (patch)
tree850eb0a4e472ba38e117a321fd42c77feac4b72a /unittests
parent1203053a0406dc04be46bebe494b1bd62b42a5de (diff)
MachineFunction: Slight refactoring; NFC
Slight cleanup/refactor in preparation for upcoming commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320882 91177308-0d34-0410-b5e6-96231b3b80d8
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