mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Record first and last instruction of a scope in DbgScope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83207 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -147,6 +147,8 @@ class VISIBILITY_HIDDEN DbgScope {
|
|||||||
// Either subprogram or block.
|
// Either subprogram or block.
|
||||||
unsigned StartLabelID; // Label ID of the beginning of scope.
|
unsigned StartLabelID; // Label ID of the beginning of scope.
|
||||||
unsigned EndLabelID; // Label ID of the end of scope.
|
unsigned EndLabelID; // Label ID of the end of scope.
|
||||||
|
const MachineInstr *LastInsn; // Last instruction of this scope.
|
||||||
|
const MachineInstr *FirstInsn; // First instruction of this scope.
|
||||||
SmallVector<DbgScope *, 4> Scopes; // Scopes defined in scope.
|
SmallVector<DbgScope *, 4> Scopes; // Scopes defined in scope.
|
||||||
SmallVector<DbgVariable *, 8> Variables;// Variables declared in scope.
|
SmallVector<DbgVariable *, 8> Variables;// Variables declared in scope.
|
||||||
SmallVector<DbgConcreteScope *, 8> ConcreteInsts;// Concrete insts of funcs.
|
SmallVector<DbgConcreteScope *, 8> ConcreteInsts;// Concrete insts of funcs.
|
||||||
@@ -155,7 +157,8 @@ class VISIBILITY_HIDDEN DbgScope {
|
|||||||
mutable unsigned IndentLevel;
|
mutable unsigned IndentLevel;
|
||||||
public:
|
public:
|
||||||
DbgScope(DbgScope *P, DIDescriptor D)
|
DbgScope(DbgScope *P, DIDescriptor D)
|
||||||
: Parent(P), Desc(D), StartLabelID(0), EndLabelID(0), IndentLevel(0) {}
|
: Parent(P), Desc(D), StartLabelID(0), EndLabelID(0), LastInsn(0),
|
||||||
|
FirstInsn(0), IndentLevel(0) {}
|
||||||
virtual ~DbgScope();
|
virtual ~DbgScope();
|
||||||
|
|
||||||
// Accessors.
|
// Accessors.
|
||||||
@@ -168,7 +171,10 @@ public:
|
|||||||
SmallVector<DbgConcreteScope*,8> &getConcreteInsts() { return ConcreteInsts; }
|
SmallVector<DbgConcreteScope*,8> &getConcreteInsts() { return ConcreteInsts; }
|
||||||
void setStartLabelID(unsigned S) { StartLabelID = S; }
|
void setStartLabelID(unsigned S) { StartLabelID = S; }
|
||||||
void setEndLabelID(unsigned E) { EndLabelID = E; }
|
void setEndLabelID(unsigned E) { EndLabelID = E; }
|
||||||
|
void setLastInsn(const MachineInstr *MI) { LastInsn = MI; }
|
||||||
|
const MachineInstr *getLastInsn() { return LastInsn; }
|
||||||
|
void setFirstInsn(const MachineInstr *MI) { FirstInsn = MI; }
|
||||||
|
const MachineInstr *getFirstInsn() { return FirstInsn; }
|
||||||
/// AddScope - Add a scope to the scope.
|
/// AddScope - Add a scope to the scope.
|
||||||
///
|
///
|
||||||
void AddScope(DbgScope *S) { Scopes.push_back(S); }
|
void AddScope(DbgScope *S) { Scopes.push_back(S); }
|
||||||
|
Reference in New Issue
Block a user