summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2015-02-09 23:00:40 +0000
committerRamkumar Ramachandra <artagnon@gmail.com>2015-02-09 23:00:40 +0000
commit2e4b9e0a37a24025649cd046e4d9cdae09d0a77f (patch)
tree7d81276145bf4d7a18b0b892bd3f5714020138c3 /llvm/lib/Transforms/Scalar
parentc18a11397c3c9ca9a35a2b9fd8cdd93829c6e0f2 (diff)
downloadbcm5719-llvm-2e4b9e0a37a24025649cd046e4d9cdae09d0a77f.tar.gz
bcm5719-llvm-2e4b9e0a37a24025649cd046e4d9cdae09d0a77f.zip
PlaceSafepoints: modernize gc.result.* -> gc.result
Differential Revision: http://reviews.llvm.org/D7516 llvm-svn: 228625
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
index 490a67cd0e4..517c4c95aa7 100644
--- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
+++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
@@ -952,18 +952,7 @@ static Value *ReplaceWithStatepoint(const CallSite &CS, /* to replace */
Instruction *gc_result = nullptr;
std::vector<Type *> types; // one per 'any' type
types.push_back(CS.getType()); // result type
- auto get_gc_result_id = [&](Type &Ty) {
- if (Ty.isIntegerTy()) {
- return Intrinsic::experimental_gc_result_int;
- } else if (Ty.isFloatingPointTy()) {
- return Intrinsic::experimental_gc_result_float;
- } else if (Ty.isPointerTy()) {
- return Intrinsic::experimental_gc_result_ptr;
- } else {
- llvm_unreachable("non java type encountered");
- }
- };
- Intrinsic::ID Id = get_gc_result_id(*CS.getType());
+ Intrinsic::ID Id = Intrinsic::experimental_gc_result;
Value *gc_result_func = Intrinsic::getDeclaration(M, Id, types);
std::vector<Value *> args;
OpenPOWER on IntegriCloud