DebugInfo: Preserve debug location information when transforming a call into an invok...
[opencl/llvm.git] / lib / Transforms / Utils / InlineFunction.cpp
index d93db5dc1ef9ee2aff4f4072238597b8c47ab44d..f0a9f2b1fcb354dc088555c534ab4cdb51100f90 100644 (file)
@@ -189,6 +189,7 @@ static void HandleCallsInBlockInlinedThroughInvoke(BasicBlock *BB,
     InvokeInst *II = InvokeInst::Create(CI->getCalledValue(), Split,
                                         Invoke.getOuterResumeDest(),
                                         InvokeArgs, CI->getName(), BB);
+    II->setDebugLoc(CI->getDebugLoc());
     II->setCallingConv(CI->getCallingConv());
     II->setAttributes(CI->getAttributes());