mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Do not drop constant values when a variable's content is described using .debug_loc entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132427 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -68,10 +68,19 @@ typedef struct DotDebugLocEntry {
|
||||
MachineLocation Loc;
|
||||
const MDNode *Variable;
|
||||
bool Merged;
|
||||
DotDebugLocEntry() : Begin(0), End(0), Variable(0), Merged(false) {}
|
||||
bool Constant;
|
||||
int64_t iConstant;
|
||||
DotDebugLocEntry()
|
||||
: Begin(0), End(0), Variable(0), Merged(false),
|
||||
Constant(false), iConstant(0) {}
|
||||
DotDebugLocEntry(const MCSymbol *B, const MCSymbol *E, MachineLocation &L,
|
||||
const MDNode *V)
|
||||
: Begin(B), End(E), Loc(L), Variable(V), Merged(false) {}
|
||||
: Begin(B), End(E), Loc(L), Variable(V), Merged(false),
|
||||
Constant(false), iConstant(0) {}
|
||||
DotDebugLocEntry(const MCSymbol *B, const MCSymbol *E, int64_t i)
|
||||
: Begin(B), End(E), Variable(0), Merged(false),
|
||||
Constant(true), iConstant(i) {}
|
||||
|
||||
/// Empty entries are also used as a trigger to emit temp label. Such
|
||||
/// labels are referenced is used to find debug_loc offset for a given DIE.
|
||||
bool isEmpty() { return Begin == 0 && End == 0; }
|
||||
@@ -82,6 +91,8 @@ typedef struct DotDebugLocEntry {
|
||||
Next->Begin = Begin;
|
||||
Merged = true;
|
||||
}
|
||||
bool isConstant() { return Constant; }
|
||||
int64_t getConstant() { return iConstant; }
|
||||
} DotDebugLocEntry;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user