14
14
#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFEXPRESSION_H
15
15
16
16
#include " ByteStreamer.h"
17
+ #include " DwarfDebug.h"
17
18
#include " llvm/ADT/ArrayRef.h"
18
19
#include " llvm/ADT/SmallVector.h"
19
20
#include " llvm/IR/DebugInfoMetadata.h"
@@ -513,7 +514,7 @@ class DwarfExprAST {
513
514
// An `std::optional<const DenseMap<_, _>&>` where `nullptr` represents
514
515
// `None`. Only present and applicable as part of an optimization for
515
516
// DIFragments which refer to global variable fragments.
516
- const DenseMap<DIFragment *, const GlobalVariable *> *GVFragmentMap;
517
+ const DwarfDebug::GVFragmentMapTy *GVFragmentMap;
517
518
std::unique_ptr<DwarfExprAST::Node> Root;
518
519
// FIXME(KZHURAVL): This is a temporary boolean variable that indicates
519
520
// whether the lowering of this expression is supported or not. If the
@@ -586,10 +587,10 @@ class DwarfExprAST {
586
587
virtual void emitDwarfLabelDelta (const MCSymbol *Hi, const MCSymbol *Lo) = 0;
587
588
588
589
public:
589
- DwarfExprAST (
590
- const AsmPrinter &AP, const TargetRegisterInfo *TRI, DwarfCompileUnit &CU,
591
- const DILifetime &Lifetime, const MachineOperand *Referrer,
592
- const DenseMap<DIFragment *, const GlobalVariable *> *GVFragmentMap)
590
+ DwarfExprAST (const AsmPrinter &AP, const TargetRegisterInfo *TRI,
591
+ DwarfCompileUnit &CU, const DILifetime &Lifetime ,
592
+ const MachineOperand *Referrer,
593
+ const DwarfDebug::GVFragmentMapTy *GVFragmentMap)
593
594
: AP(AP), TRI(TRI), CU(CU), Lifetime(Lifetime), Referrer(Referrer),
594
595
GVFragmentMap (GVFragmentMap) {
595
596
buildDIExprAST ();
@@ -610,24 +611,23 @@ class DebugLocDwarfExprAST final : DwarfExprAST {
610
611
void emitDwarfOpAddrx (unsigned Index) override ;
611
612
void emitDwarfLabelDelta (const MCSymbol *Hi, const MCSymbol *Lo) override ;
612
613
613
- DebugLocDwarfExprAST (
614
- const AsmPrinter &AP, const TargetRegisterInfo *TRI, DwarfCompileUnit &CU,
615
- BufferByteStreamer &BS, const DILifetime &Lifetime,
616
- const MachineOperand *Referrer,
617
- const DenseMap<DIFragment *, const GlobalVariable *> *GVFragmentMap)
614
+ DebugLocDwarfExprAST (const AsmPrinter &AP, const TargetRegisterInfo *TRI,
615
+ DwarfCompileUnit &CU, BufferByteStreamer &BS ,
616
+ const DILifetime &Lifetime,
617
+ const MachineOperand *Referrer,
618
+ const DwarfDebug::GVFragmentMapTy *GVFragmentMap)
618
619
: DwarfExprAST(AP, TRI, CU, Lifetime, Referrer, GVFragmentMap),
619
620
OutBS (BS) {}
620
621
621
- public:
622
+ public:
622
623
DebugLocDwarfExprAST (const AsmPrinter &AP, const TargetRegisterInfo &TRI,
623
624
DwarfCompileUnit &CU, BufferByteStreamer &BS,
624
625
const DILifetime &Lifetime,
625
626
const MachineOperand &Referrer)
626
627
: DebugLocDwarfExprAST(AP, &TRI, CU, BS, Lifetime, &Referrer, nullptr ) {}
627
- DebugLocDwarfExprAST (
628
- const AsmPrinter &AP, DwarfCompileUnit &CU, BufferByteStreamer &BS,
629
- const DILifetime &Lifetime,
630
- const DenseMap<DIFragment *, const GlobalVariable *> &GVFragmentMap)
628
+ DebugLocDwarfExprAST (const AsmPrinter &AP, DwarfCompileUnit &CU,
629
+ BufferByteStreamer &BS, const DILifetime &Lifetime,
630
+ const DwarfDebug::GVFragmentMapTy &GVFragmentMap)
631
631
: DebugLocDwarfExprAST(AP, nullptr , CU, BS, Lifetime, nullptr ,
632
632
&GVFragmentMap) {}
633
633
DebugLocDwarfExprAST (const DebugLocDwarfExprAST &) = delete;
@@ -653,10 +653,10 @@ class DIEDwarfExprAST final : DwarfExprAST {
653
653
void emitDwarfOpAddrx (unsigned Index) override ;
654
654
void emitDwarfLabelDelta (const MCSymbol *Hi, const MCSymbol *Lo) override ;
655
655
656
- DIEDwarfExprAST (
657
- const AsmPrinter &AP, const TargetRegisterInfo *TRI, DwarfCompileUnit &CU,
658
- DIELoc &DIE, const DILifetime &Lifetime, const MachineOperand *Referrer,
659
- const DenseMap<DIFragment *, const GlobalVariable *> *GVFragmentMap)
656
+ DIEDwarfExprAST (const AsmPrinter &AP, const TargetRegisterInfo *TRI,
657
+ DwarfCompileUnit &CU, DIELoc &DIE, const DILifetime &Lifetime ,
658
+ const MachineOperand *Referrer,
659
+ const DwarfDebug::GVFragmentMapTy *GVFragmentMap)
660
660
: DwarfExprAST(AP, TRI, CU, Lifetime, Referrer, GVFragmentMap),
661
661
OutDIE (DIE) {}
662
662
@@ -665,10 +665,9 @@ class DIEDwarfExprAST final : DwarfExprAST {
665
665
DwarfCompileUnit &CU, DIELoc &DIE, const DILifetime &Lifetime,
666
666
const MachineOperand &Referrer)
667
667
: DIEDwarfExprAST(AP, &TRI, CU, DIE, Lifetime, &Referrer, nullptr ) {}
668
- DIEDwarfExprAST (
669
- const AsmPrinter &AP, DwarfCompileUnit &CU, DIELoc &DIE,
670
- const DILifetime &Lifetime,
671
- const DenseMap<DIFragment *, const GlobalVariable *> &GVFragmentMap)
668
+ DIEDwarfExprAST (const AsmPrinter &AP, DwarfCompileUnit &CU, DIELoc &DIE,
669
+ const DILifetime &Lifetime,
670
+ const DwarfDebug::GVFragmentMapTy &GVFragmentMap)
672
671
: DIEDwarfExprAST(AP, nullptr , CU, DIE, Lifetime, nullptr ,
673
672
&GVFragmentMap) {}
674
673
DIEDwarfExprAST (const DIEDwarfExprAST &) = delete;
0 commit comments