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