xref: /freebsd/contrib/llvm-project/llvm/lib/CodeGen/LiveDebugValues/LiveDebugValues.h (revision 43a5ec4eb41567cc92586503212743d89686d78f)
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) = 0;
27   virtual ~LDVImpl() {}
28 };
29 
30 } // namespace SharedLiveDebugValues
31 
32 // Factory functions for LiveDebugValues implementations.
33 extern LDVImpl *makeVarLocBasedLiveDebugValues();
34 extern LDVImpl *makeInstrRefBasedLiveDebugValues();
35 } // namespace llvm
36 
37 #endif // LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H
38