DebugInfo: Preserve debug location information when transforming a call into an invoke during inlining.
This both improves basic debug info quality, but also fixes a larger hole whenever we inline a call/invoke without a location (debug info for the entire inlining is lost and other badness that the debug info emission code is currently working around but shouldn't have to). llvm-svn: 212065
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user