mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-17 23:44:43 +00:00
Process DbgDeclareInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb3af88ba7
commit
b4d31306a4
@ -638,6 +638,9 @@ namespace llvm {
|
||||
/// processRegionEnd - Process DbgRegionEnd.
|
||||
void processRegionEnd(DbgRegionEndInst *DRE);
|
||||
|
||||
/// processDeclare - Process DbgDeclareInst.
|
||||
void processDeclare(DbgDeclareInst *DDI);
|
||||
|
||||
/// addCompileUnit - Add compile unit into CUs.
|
||||
bool addCompileUnit(DICompileUnit CU);
|
||||
|
||||
|
@ -924,6 +924,8 @@ void DebugInfoFinder::processModule(Module &M) {
|
||||
processRegionStart(DRS);
|
||||
else if (DbgRegionEndInst *DRE = dyn_cast<DbgRegionEndInst>(BI))
|
||||
processRegionEnd(DRE);
|
||||
else if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI))
|
||||
processDeclare(DDI);
|
||||
}
|
||||
|
||||
for (Module::global_iterator GVI = M.global_begin(), GVE = M.global_end();
|
||||
@ -1003,6 +1005,19 @@ void DebugInfoFinder::processRegionEnd(DbgRegionEndInst *DRE) {
|
||||
processSubprogram(DISubprogram(SP));
|
||||
}
|
||||
|
||||
/// processDeclare - Process DbgDeclareInst.
|
||||
void DebugInfoFinder::processDeclare(DbgDeclareInst *DDI) {
|
||||
DIVariable DV(cast<GlobalVariable>(DDI->getVariable()));
|
||||
if (DV.isNull())
|
||||
return;
|
||||
|
||||
if (!NodesSeen.insert(DV.getGV()))
|
||||
return;
|
||||
|
||||
addCompileUnit(DV.getCompileUnit());
|
||||
processType(DV.getType());
|
||||
}
|
||||
|
||||
/// addCompileUnit - Add compile unit into CUs.
|
||||
bool DebugInfoFinder::addCompileUnit(DICompileUnit CU) {
|
||||
if (CU.isNull())
|
||||
|
Loading…
x
Reference in New Issue
Block a user