3 #include <llvm/IR/DebugLoc.h>
4 //#include <llvm/IR/Constant.h>
5 //#include <llvm/IR/Instruction.h>
6 //#include <llvm/IR/IRBuilder.h>
7 //#include <llvm/Support/raw_ostream.h>
9 Value *getPosition( Instruction * I, IRBuilder <> IRB)
11 const DebugLoc & debug_location = I->getDebugLoc ();
12 std::string position_string;
14 llvm::raw_string_ostream position_stream (position_string);
15 debug_location . print (position_stream);
18 return IRB . CreateGlobalStringPtr (position_string);