This is an archive of the discontinued LLVM Phabricator instance.

[OperandBundles] Copy DebugLoc with calls/invokes
ClosedPublic

Authored by JosephTremoulet on Jan 13 2016, 2:42 PM.

Details

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.

Diff Detail

Event Timeline

JosephTremoulet retitled this revision from to [OperandBundles] Copy DebugLoc with calls/invokes.
JosephTremoulet updated this object.
JosephTremoulet added a reviewer: sanjoy.
JosephTremoulet added a subscriber: llvm-commits.

Test case(s)?

Test case(s)?

Sure, I can add something. Would extending unittests/IR/IRBuilderTest.cpp to cover this API be the right way to go?

Test case(s)?

Sure, I can add something. Would extending unittests/IR/IRBuilderTest.cpp to cover this API be the right way to go?

Oh, looks like something next to InstructionsTest :: CloenCall would be more appropriate. Will update.

majnemer accepted this revision.Jan 13 2016, 10:21 PM
majnemer added a reviewer: majnemer.
majnemer added a subscriber: majnemer.

LGTM

This revision is now accepted and ready to land.Jan 13 2016, 10:21 PM