forked from OSchip/llvm-project
First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
Patch by Sunae Seo. llvm-svn: 85518
This commit is contained in:
parent
453d64c9f5
commit
78c327f171
|
@ -1304,9 +1304,10 @@ namespace llvm {
|
|||
// Look for the bitcast.
|
||||
for (Value::use_const_iterator I = V->use_begin(), E =V->use_end();
|
||||
I != E; ++I)
|
||||
if (isa<BitCastInst>(I))
|
||||
return findDbgDeclare(*I, false);
|
||||
|
||||
if (isa<BitCastInst>(I)) {
|
||||
const DbgDeclareInst *DDI = findDbgDeclare(*I, false);
|
||||
if (DDI) return DDI;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue