mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 18:51:34 +00:00
This patch renames the current LiveDebugValues class to "VarLocBasedLDV" and removes the pass-registration code from it. It creates a separate LiveDebugValues class that deals with pass registration and management, that calls through to VarLocBasedLDV::ExtendRanges when runOnMachineFunction is called. This is done through the "LDVImpl" abstract class, so that a future patch can install the new instruction-referencing LiveDebugValues implementation and have it picked at runtime. No functional change is intended, just shuffling responsibilities. Differential Revision: https://reviews.llvm.org/D83046
32 lines
1.0 KiB
C++
32 lines
1.0 KiB
C++
//===- LiveDebugValues.cpp - Tracking Debug Value MIs ---------*- C++ -*---===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/CodeGen/MachineFunction.h"
|
|
#include "llvm/CodeGen/TargetPassConfig.h"
|
|
|
|
namespace llvm {
|
|
|
|
// Inline namespace for types / symbols shared between different
|
|
// LiveDebugValues implementations.
|
|
inline namespace SharedLiveDebugValues {
|
|
|
|
// Expose a base class for LiveDebugValues interfaces to inherit from. This
|
|
// allows the generic LiveDebugValues pass handles to call into the
|
|
// implementation.
|
|
class LDVImpl {
|
|
public:
|
|
virtual bool ExtendRanges(MachineFunction &MF, TargetPassConfig *TPC) = 0;
|
|
virtual ~LDVImpl() {}
|
|
};
|
|
|
|
} // namespace SharedLiveDebugValues
|
|
|
|
// Factory functions for LiveDebugValues implementations.
|
|
extern LDVImpl *makeVarLocBasedLiveDebugValues();
|
|
} // namespace llvm
|