summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-30 20:30:39 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-30 20:30:39 +0000
commit644d2eee593ec26ead0490a025087349b8301d27 (patch)
tree050d0bc1f8cf5ae410c2de82f4f7241cdeb1f2fe /llvm/lib/Transforms/Utils/InlineFunction.cpp
parentc6496816b1868fae52cd5e188202ddea12dbb366 (diff)
downloadbcm5719-llvm-644d2eee593ec26ead0490a025087349b8301d27.tar.gz
bcm5719-llvm-644d2eee593ec26ead0490a025087349b8301d27.zip
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
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index d93db5dc1ef..f0a9f2b1fcb 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -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());
OpenPOWER on IntegriCloud