1be24c020SYury Delendik // WebAssemblyDebugValueManager.h - WebAssembly DebugValue Manager -*- C++ -*-// 2be24c020SYury Delendik // 32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6be24c020SYury Delendik // 7be24c020SYury Delendik //===----------------------------------------------------------------------===// 8be24c020SYury Delendik /// 9be24c020SYury Delendik /// \file 10be24c020SYury Delendik /// This file contains the declaration of the WebAssembly-specific 11be24c020SYury Delendik /// manager for DebugValues associated with the specific MachineInstr. 12be24c020SYury Delendik /// 13be24c020SYury Delendik //===----------------------------------------------------------------------===// 14be24c020SYury Delendik 15be24c020SYury Delendik #ifndef LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H 16be24c020SYury Delendik #define LLVM_LIB_TARGET_WEBASSEMBLY_WEBASSEMBLYDEBUGVALUEMANAGER_H 17be24c020SYury Delendik 18be24c020SYury Delendik #include "llvm/ADT/SmallVector.h" 19be24c020SYury Delendik 20be24c020SYury Delendik namespace llvm { 21be24c020SYury Delendik 22be24c020SYury Delendik class MachineInstr; 23be24c020SYury Delendik 24be24c020SYury Delendik class WebAssemblyDebugValueManager { 25be24c020SYury Delendik SmallVector<MachineInstr *, 2> DbgValues; 26*1db137b1SStephen Tozer unsigned CurrentReg; 27be24c020SYury Delendik 28be24c020SYury Delendik public: 29be24c020SYury Delendik WebAssemblyDebugValueManager(MachineInstr *Instr); 30be24c020SYury Delendik 31be24c020SYury Delendik void move(MachineInstr *Insert); 32be24c020SYury Delendik void updateReg(unsigned Reg); 33be24c020SYury Delendik void clone(MachineInstr *Insert, unsigned NewReg); 34adf7a0a5SYury Delendik void replaceWithLocal(unsigned LocalId); 35be24c020SYury Delendik }; 36be24c020SYury Delendik 37be24c020SYury Delendik } // end namespace llvm 38be24c020SYury Delendik 39be24c020SYury Delendik #endif 40