aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
authorJoseph Tremoulet <jotrem@microsoft.com>2016-01-14 06:21:42 +0000
committerJoseph Tremoulet <jotrem@microsoft.com>2016-01-14 06:21:42 +0000
commitbba70e44240bb808ddbac87ad5ed633548f1e7cc (patch)
treee64ad735995663931e131c4ef6ed2c20d221a0a3 /llvm/lib/IR/Instructions.cpp
parentd5d8887d28a8a59123d01eb9e7ed0da1a6bf5d37 (diff)
downloadllvm-bba70e44240bb808ddbac87ad5ed633548f1e7cc.zip
llvm-bba70e44240bb808ddbac87ad5ed633548f1e7cc.tar.gz
llvm-bba70e44240bb808ddbac87ad5ed633548f1e7cc.tar.bz2
[OperandBundles] Copy DebugLoc with calls/invokes
Summary: The overloads of CallInst::Create and InvokeInst::Create that are used to adjust operand bundles purport to create a new instruction "identical in every way except [for] the operand bundles", so copy the DebugLoc along with everything else. Reviewers: sanjoy, majnemer Subscribers: majnemer, dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D16157 llvm-svn: 257745
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 7c64ca7..3559bb3 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -309,6 +309,7 @@ CallInst *CallInst::Create(CallInst *CI, ArrayRef<OperandBundleDef> OpB,
NewCI->setCallingConv(CI->getCallingConv());
NewCI->SubclassOptionalData = CI->SubclassOptionalData;
NewCI->setAttributes(CI->getAttributes());
+ NewCI->setDebugLoc(CI->getDebugLoc());
return NewCI;
}
@@ -596,6 +597,7 @@ InvokeInst *InvokeInst::Create(InvokeInst *II, ArrayRef<OperandBundleDef> OpB,
NewII->setCallingConv(II->getCallingConv());
NewII->SubclassOptionalData = II->SubclassOptionalData;
NewII->setAttributes(II->getAttributes());
+ NewII->setDebugLoc(II->getDebugLoc());
return NewII;
}