45 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H10#define LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H11 12namespace llvm {13class MachineDominatorTree;14class MachineFunction;15class TargetPassConfig;16class Triple;17 18// Inline namespace for types / symbols shared between different19// LiveDebugValues implementations.20inline namespace SharedLiveDebugValues {21 22// Expose a base class for LiveDebugValues interfaces to inherit from. This23// allows the generic LiveDebugValues pass handles to call into the24// implementation.25class LDVImpl {26public:27 virtual bool ExtendRanges(MachineFunction &MF, MachineDominatorTree *DomTree,28 bool ShouldEmitDebugEntryValues,29 unsigned InputBBLimit,30 unsigned InputDbgValLimit) = 0;31 virtual ~LDVImpl() = default;32};33 34} // namespace SharedLiveDebugValues35 36// Factory functions for LiveDebugValues implementations.37extern LDVImpl *makeVarLocBasedLiveDebugValues();38extern LDVImpl *makeInstrRefBasedLiveDebugValues();39 40extern bool debuginfoShouldUseDebugInstrRef(const Triple &T);41 42} // namespace llvm43 44#endif // LLVM_LIB_CODEGEN_LIVEDEBUGVALUES_LIVEDEBUGVALUES_H45