summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunctionPass.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-06-06 00:44:35 +0000
committerMatthias Braun <matze@braunis.de>2017-06-06 00:44:35 +0000
commit7bda19581229e4b78ccab72a2102d251cc1ab279 (patch)
treeb8e784f75744254b876fe5d18ba9d248515332cc /llvm/lib/CodeGen/MachineFunctionPass.cpp
parent707524556c490b05f62529d6ccf7e646e7e9d52c (diff)
downloadbcm5719-llvm-7bda19581229e4b78ccab72a2102d251cc1ab279.tar.gz
bcm5719-llvm-7bda19581229e4b78ccab72a2102d251cc1ab279.zip
CodeGen: Refactor MIR parsing
When parsing .mir files immediately construct the MachineFunctions and put them into MachineModuleInfo. This allows us to get rid of the delayed construction (and delayed error reporting) through the MachineFunctionInitialzier interface. Differential Revision: https://reviews.llvm.org/D33809 llvm-svn: 304758
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunctionPass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunctionPass.cpp b/llvm/lib/CodeGen/MachineFunctionPass.cpp
index 2265676ff8b..5ffe3300613 100644
--- a/llvm/lib/CodeGen/MachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPass.cpp
@@ -42,7 +42,7 @@ bool MachineFunctionPass::runOnFunction(Function &F) {
return false;
MachineModuleInfo &MMI = getAnalysis<MachineModuleInfo>();
- MachineFunction &MF = MMI.getMachineFunction(F);
+ MachineFunction &MF = MMI.getOrCreateMachineFunction(F);
MachineFunctionProperties &MFProps = MF.getProperties();
OpenPOWER on IntegriCloud