how to get source code location information in LLVM3.7.0?

could anyone give me some examples to get a instruction’s line and filename information in source codes in LLVM3.7.0?

thank you!

Example:

Module &M = /* .. */
Instruction &Inst = /* . */

const DebugLoc &DL = Inst.getDebugLoc();

StringRef file = M.getName();
unsigned Line = DL.getLine();
unsigned Col = DL.getCol();

DebugLoc documentation.
Module documentation.