[gc.statepoint] Change gc.statepoint intrinsic's return type to token type instead...
[oota-llvm.git] / lib / Transforms / Scalar / RewriteStatepointsForGC.cpp
index 0a61d4b5da0f579f89cb8d1d2f1c597f8a74fd60..a077ba01a9282425e9ffe7c39b75a486a9eb36ce 100644 (file)
@@ -1505,11 +1505,8 @@ makeStatepointExplicitImpl(const CallSite CS, /* to replace */
     Builder.SetInsertPoint(&*UnwindBlock->getFirstInsertionPt());
     Builder.SetCurrentDebugLocation(ToReplace->getDebugLoc());
 
-    // Extract second element from landingpad return value. We will attach
-    // exceptional gc relocates to it.
-    Instruction *ExceptionalToken =
-        cast<Instruction>(Builder.CreateExtractValue(
-            UnwindBlock->getLandingPadInst(), 1, "relocate_token"));
+    // Attach exceptional gc relocates to the landingpad.
+    Instruction *ExceptionalToken = UnwindBlock->getLandingPadInst();
     Result.UnwindToken = ExceptionalToken;
 
     const unsigned LiveStartIdx = Statepoint(Token).gcArgsStartIdx();