1*e8d8bef9SDimitry Andric //===- LiveDebugValues.cpp - Tracking Debug Value MIs ---------*- C++ -*---===// 2*e8d8bef9SDimitry Andric // 3*e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*e8d8bef9SDimitry Andric // 7*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8*e8d8bef9SDimitry Andric 9*e8d8bef9SDimitry Andric #include "llvm/CodeGen/MachineFunction.h" 10*e8d8bef9SDimitry Andric #include "llvm/CodeGen/TargetPassConfig.h" 11*e8d8bef9SDimitry Andric 12*e8d8bef9SDimitry Andric namespace llvm { 13*e8d8bef9SDimitry Andric 14*e8d8bef9SDimitry Andric // Inline namespace for types / symbols shared between different 15*e8d8bef9SDimitry Andric // LiveDebugValues implementations. 16*e8d8bef9SDimitry Andric inline namespace SharedLiveDebugValues { 17*e8d8bef9SDimitry Andric 18*e8d8bef9SDimitry Andric // Expose a base class for LiveDebugValues interfaces to inherit from. This 19*e8d8bef9SDimitry Andric // allows the generic LiveDebugValues pass handles to call into the 20*e8d8bef9SDimitry Andric // implementation. 21*e8d8bef9SDimitry Andric class LDVImpl { 22*e8d8bef9SDimitry Andric public: 23*e8d8bef9SDimitry Andric virtual bool ExtendRanges(MachineFunction &MF, TargetPassConfig *TPC) = 0; 24*e8d8bef9SDimitry Andric virtual ~LDVImpl() {} 25*e8d8bef9SDimitry Andric }; 26*e8d8bef9SDimitry Andric 27*e8d8bef9SDimitry Andric } // namespace SharedLiveDebugValues 28*e8d8bef9SDimitry Andric 29*e8d8bef9SDimitry Andric // Factory functions for LiveDebugValues implementations. 30*e8d8bef9SDimitry Andric extern LDVImpl *makeVarLocBasedLiveDebugValues(); 31*e8d8bef9SDimitry Andric extern LDVImpl *makeInstrRefBasedLiveDebugValues(); 32*e8d8bef9SDimitry Andric } // namespace llvm 33