debug calls

Hi All,
Is there a way to detect metadata functions like
call void @llvm.dbg.declare(metadata !{i32* %g}, metadata !35), !dbg !37

Thanks.

George

One obvious way is to walk IR and check for function calls that use metadata as an operand.
What are you trying to do ?