mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
Add utility routine to collect variable debug info. This is not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83355 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ea5ed00ea3
commit
e717faa467
@ -1782,6 +1782,20 @@ void DwarfDebug::EndModule() {
|
||||
DebugTimer->stopTimer();
|
||||
}
|
||||
|
||||
/// CollectVariableInfo - Populate DbgScope entries with variables' info.
|
||||
void DwarfDebug::CollectVariableInfo() {
|
||||
if (!MMI) return;
|
||||
MachineModuleInfo::VariableDbgInfoMapTy &VMap = MMI->getVariableDbgInfo();
|
||||
for (MachineModuleInfo::VariableDbgInfoMapTy::iterator VI = VMap.begin(),
|
||||
VE = VMap.end(); VI != VE; ++VI) {
|
||||
MDNode *Var = VI->first;
|
||||
DILocation VLoc(VI->second.first);
|
||||
unsigned VSlot = VI->second.second;
|
||||
DbgScope *Scope = getDbgScope(VLoc.getScope().getNode(), NULL);
|
||||
Scope->AddVariable(new DbgVariable(DIVariable(Var), VSlot, false));
|
||||
}
|
||||
}
|
||||
|
||||
/// ExtractScopeInformation - Scan machine instructions in this function
|
||||
/// and collect DbgScopes. Return true, if atleast one scope was found.
|
||||
bool DwarfDebug::ExtractScopeInformation(MachineFunction *MF) {
|
||||
|
@ -560,6 +560,9 @@ public:
|
||||
/// and collect DbgScopes. Return true, if atleast one scope was found.
|
||||
bool ExtractScopeInformation(MachineFunction *MF);
|
||||
|
||||
/// CollectVariableInfo - Populate DbgScope entries with variables' info.
|
||||
void CollectVariableInfo();
|
||||
|
||||
void SetDbgScopeLabels(const MachineInstr *MI, unsigned Label);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user