forked from OSchip/llvm-project
walk DbgRegionStartInst and DbgRegionEndInst
llvm-svn: 77604
This commit is contained in:
parent
6d39426d68
commit
5262314b8d
|
@ -633,6 +633,12 @@ namespace llvm {
|
|||
/// enumerateFuncStart - Enumberate DbgFuncStartInst.
|
||||
void enumerateFuncStart(DbgFuncStartInst *FSI);
|
||||
|
||||
/// enumerateRegionStart - Enumerate DbgRegionStart.
|
||||
void enumerateRegionStart(DbgRegionStartInst *DRS);
|
||||
|
||||
/// enumerateRegionEnd - Enumerate DbgRegionEnd.
|
||||
void enumerateRegionEnd(DbgRegionEndInst *DRE);
|
||||
|
||||
/// addCompileUnit - Add compile unit into CUs.
|
||||
bool addCompileUnit(DICompileUnit CU);
|
||||
|
||||
|
|
|
@ -920,6 +920,10 @@ void DebugInfoEnumerator::enumerateModule(Module &M) {
|
|||
enumerateStopPoint(SPI);
|
||||
else if (DbgFuncStartInst *FSI = dyn_cast<DbgFuncStartInst>(BI))
|
||||
enumerateFuncStart(FSI);
|
||||
else if (DbgRegionStartInst *DRS = dyn_cast<DbgRegionStartInst>(BI))
|
||||
enumerateRegionStart(DRS);
|
||||
else if (DbgRegionEndInst *DRE = dyn_cast<DbgRegionEndInst>(BI))
|
||||
enumerateRegionEnd(DRE);
|
||||
}
|
||||
|
||||
for (Module::global_iterator GVI = M.global_begin(), GVE = M.global_end();
|
||||
|
@ -965,8 +969,10 @@ void DebugInfoEnumerator::enumerateType(DIType DT) {
|
|||
}
|
||||
}
|
||||
|
||||
/// enumerateSubprogram - Enumberate DISubprogram.
|
||||
/// enumerateSubprogram - Enumerate DISubprogram.
|
||||
void DebugInfoEnumerator::enumerateSubprogram(DISubprogram SP) {
|
||||
if (SP.isNull())
|
||||
return;
|
||||
if (!addSubprogram(SP))
|
||||
return;
|
||||
addCompileUnit(SP.getCompileUnit());
|
||||
|
@ -979,12 +985,24 @@ void DebugInfoEnumerator::enumerateStopPoint(DbgStopPointInst *SPI) {
|
|||
addCompileUnit(DICompileUnit(Context));
|
||||
}
|
||||
|
||||
/// enumerateFuncStart - Enumberate DbgFuncStartInst.
|
||||
/// enumerateFuncStart - Enumerate DbgFuncStartInst.
|
||||
void DebugInfoEnumerator::enumerateFuncStart(DbgFuncStartInst *FSI) {
|
||||
GlobalVariable *SP = dyn_cast<GlobalVariable>(FSI->getSubprogram());
|
||||
enumerateSubprogram(DISubprogram(SP));
|
||||
}
|
||||
|
||||
/// enumerateRegionStart - Enumerate DbgRegionStart.
|
||||
void DebugInfoEnumerator::enumerateRegionStart(DbgRegionStartInst *DRS) {
|
||||
GlobalVariable *SP = dyn_cast<GlobalVariable>(DRS->getContext());
|
||||
enumerateSubprogram(DISubprogram(SP));
|
||||
}
|
||||
|
||||
/// enumerateRegionEnd - Enumerate DbgRegionEnd.
|
||||
void DebugInfoEnumerator::enumerateRegionEnd(DbgRegionEndInst *DRE) {
|
||||
GlobalVariable *SP = dyn_cast<GlobalVariable>(DRE->getContext());
|
||||
enumerateSubprogram(DISubprogram(SP));
|
||||
}
|
||||
|
||||
/// addCompileUnit - Add compile unit into CUs.
|
||||
bool DebugInfoEnumerator::addCompileUnit(DICompileUnit CU) {
|
||||
if (CU.isNull())
|
||||
|
|
Loading…
Reference in New Issue