@@ -105,10 +105,8 @@ void DebugInfoFinder::processCompileUnit(DICompileUnit *CU) {
105
105
106
106
void DebugInfoFinder::processInstruction (const Module &M,
107
107
const Instruction &I) {
108
- if (auto *DDI = dyn_cast<DbgDeclareInst>(&I))
109
- processDeclare (M, DDI);
110
- else if (auto *DVI = dyn_cast<DbgValueInst>(&I))
111
- processValue (M, DVI);
108
+ if (auto *DVI = dyn_cast<DbgVariableIntrinsic>(&I))
109
+ processVariable (M, *DVI);
112
110
113
111
if (auto DbgLoc = I.getDebugLoc ())
114
112
processLocation (M, DbgLoc.get ());
@@ -194,24 +192,9 @@ void DebugInfoFinder::processSubprogram(DISubprogram *SP) {
194
192
}
195
193
}
196
194
197
- void DebugInfoFinder::processDeclare (const Module &M,
198
- const DbgDeclareInst *DDI) {
199
- auto *N = dyn_cast<MDNode>(DDI->getVariable ());
200
- if (!N)
201
- return ;
202
-
203
- auto *DV = dyn_cast<DILocalVariable>(N);
204
- if (!DV)
205
- return ;
206
-
207
- if (!NodesSeen.insert (DV).second )
208
- return ;
209
- processScope (DV->getScope ());
210
- processType (DV->getType ());
211
- }
212
-
213
- void DebugInfoFinder::processValue (const Module &M, const DbgValueInst *DVI) {
214
- auto *N = dyn_cast<MDNode>(DVI->getVariable ());
195
+ void DebugInfoFinder::processVariable (const Module &M,
196
+ const DbgVariableIntrinsic &DVI) {
197
+ auto *N = dyn_cast<MDNode>(DVI.getVariable ());
215
198
if (!N)
216
199
return ;
217
200
0 commit comments