mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Add APIs to record regions and variables.
Again, shamelessly copied from MMI. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7a6e5a3531
commit
2ec78c4a63
@ -2540,6 +2540,33 @@ private:
|
||||
}
|
||||
|
||||
|
||||
/// RecordRegionStart - Indicate the start of a region.
|
||||
///
|
||||
unsigned RecordRegionStart(GlobalVariable *V) {
|
||||
DbgScope *Scope = getOrCreateScope(V);
|
||||
unsigned ID = NextLabelID();
|
||||
if (!Scope->getStartLabelID()) Scope->setStartLabelID(ID);
|
||||
return ID;
|
||||
}
|
||||
|
||||
/// RecordRegionEnd - Indicate the end of a region.
|
||||
///
|
||||
unsigned RecordRegionEnd(GlobalVariable *V) {
|
||||
DbgScope *Scope = getOrCreateScope(V);
|
||||
unsigned ID = NextLabelID();
|
||||
Scope->setEndLabelID(ID);
|
||||
return ID;
|
||||
}
|
||||
|
||||
/// RecordVariable - Indicate the declaration of a local variable.
|
||||
///
|
||||
void RecordVariable(GlobalVariable *GV, unsigned FrameIndex) {
|
||||
DbgScope *Scope = getOrCreateScope(GV);
|
||||
DIVariable *VD = new DIVariable(GV);
|
||||
DbgVariable *DV = new DbgVariable(VD, FrameIndex);
|
||||
Scope->AddVariable(DV);
|
||||
}
|
||||
|
||||
/// getOrCreateScope - Returns the scope associated with the given descriptor.
|
||||
///
|
||||
DbgScope *getOrCreateScope(GlobalVariable *V) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user