summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-05-15 00:26:21 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-05-15 00:26:21 +0000
commit2c2661456e3c89c2b2287c050515be3f5b906c87 (patch)
treeb8aee7809aa1e2378609ff1d490d96351ae76cdb /llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
parent8045810c58be96981cf5483f20e9aed3e98b505c (diff)
downloadbcm5719-llvm-2c2661456e3c89c2b2287c050515be3f5b906c87.tar.gz
bcm5719-llvm-2c2661456e3c89c2b2287c050515be3f5b906c87.zip
[PlaceSafepoints] Fix a bug that came in with rL236672.
Transfer the calling convention from the invoke being replaced by PlaceStatepoints to the new invoke to gc.statepoint created. Add a test case that would have caught this issue. llvm-svn: 237414
Diffstat (limited to 'llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
index 53eed86b81f..319e5c79da4 100644
--- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
+++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
@@ -951,6 +951,8 @@ static Value *ReplaceWithStatepoint(const CallSite &CS, /* to replace */
ToReplace->getUnwindDest(), makeArrayRef(CS.arg_begin(), CS.arg_end()),
None, None, "safepoint_token");
+ Invoke->setCallingConv(ToReplace->getCallingConv());
+
// In case if we can handle this set of attributes - set up function
// attributes directly on statepoint and return attributes later for
// gc_result intrinsic.
OpenPOWER on IntegriCloud