aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2022-11-02 14:46:00 -0700
committerMatt Arsenault <Matthew.Arsenault@amd.com>2022-11-11 16:38:51 -0800
commitff2b60bbcb28701c86b200b0c03439a2e6ef6b44 (patch)
tree97fc1c0f6de4bac8fe4410a1870448e3bf4678b0 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parent76db4e3c439e6bc2921690e501ba025998f4599d (diff)
downloadllvm-ff2b60bbcb28701c86b200b0c03439a2e6ef6b44.zip
llvm-ff2b60bbcb28701c86b200b0c03439a2e6ef6b44.tar.gz
llvm-ff2b60bbcb28701c86b200b0c03439a2e6ef6b44.tar.bz2
WebAssembly: Remove MachineFunction reference from MFI
The MachineFunctionInfo here is a bit awkward because WasmEHInfo is in the MachineFunction but handled from the target code. Either everything should move into WebAssembly or into the MachineFunction for MIR serialization.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
index 76f0363..9e4a303 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
@@ -585,7 +585,7 @@ WebAssemblyTargetMachine::createDefaultFuncInfoYAML() const {
yaml::MachineFunctionInfo *WebAssemblyTargetMachine::convertFuncInfoToYAML(
const MachineFunction &MF) const {
const auto *MFI = MF.getInfo<WebAssemblyFunctionInfo>();
- return new yaml::WebAssemblyFunctionInfo(*MFI);
+ return new yaml::WebAssemblyFunctionInfo(MF, *MFI);
}
bool WebAssemblyTargetMachine::parseMachineFunctionInfo(
@@ -593,6 +593,6 @@ bool WebAssemblyTargetMachine::parseMachineFunctionInfo(
SMDiagnostic &Error, SMRange &SourceRange) const {
const auto &YamlMFI = static_cast<const yaml::WebAssemblyFunctionInfo &>(MFI);
MachineFunction &MF = PFS.MF;
- MF.getInfo<WebAssemblyFunctionInfo>()->initializeBaseYamlFields(YamlMFI);
+ MF.getInfo<WebAssemblyFunctionInfo>()->initializeBaseYamlFields(MF, YamlMFI);
return false;
}