1 //===- LiveDebugValues.cpp - Tracking Debug Value MIs ---------*- 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 #include "llvm/CodeGen/MachineFunction.h" 10 #include "llvm/CodeGen/TargetPassConfig.h" 11 12 namespace llvm { 13 14 // Inline namespace for types / symbols shared between different 15 // LiveDebugValues implementations. 16 inline namespace SharedLiveDebugValues { 17 18 // Expose a base class for LiveDebugValues interfaces to inherit from. This 19 // allows the generic LiveDebugValues pass handles to call into the 20 // implementation. 21 class LDVImpl { 22 public: 23 virtual bool ExtendRanges(MachineFunction &MF, TargetPassConfig *TPC) = 0; ~LDVImpl()24 virtual ~LDVImpl() {} 25 }; 26 27 } // namespace SharedLiveDebugValues 28 29 // Factory functions for LiveDebugValues implementations. 30 extern LDVImpl *makeVarLocBasedLiveDebugValues(); 31 extern LDVImpl *makeInstrRefBasedLiveDebugValues(); 32 } // namespace llvm 33