1 //=- RISCVMachineFunctionInfo.cpp - RISCV machine function info ---*- C++ -*-=// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 // 9 // This file declares RISCV-specific per-machine-function information. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #include "RISCVMachineFunctionInfo.h" 14 15 using namespace llvm; 16 17 yaml::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo( 18 const llvm::RISCVMachineFunctionInfo &MFI) 19 : VarArgsFrameIndex(MFI.getVarArgsFrameIndex()), 20 VarArgsSaveSize(MFI.getVarArgsSaveSize()) {} 21 22 void yaml::RISCVMachineFunctionInfo::mappingImpl(yaml::IO &YamlIO) { 23 MappingTraits<RISCVMachineFunctionInfo>::mapping(YamlIO, *this); 24 } 25 26 void RISCVMachineFunctionInfo::initializeBaseYamlFields( 27 const yaml::RISCVMachineFunctionInfo &YamlMFI) { 28 VarArgsFrameIndex = YamlMFI.VarArgsFrameIndex; 29 VarArgsSaveSize = YamlMFI.VarArgsSaveSize; 30 } 31