File tree 1 file changed +0
-16
lines changed
llvm/lib/Transforms/Coroutines
1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -81,22 +81,6 @@ class CoroIdElider {
81
81
// provided constant.
82
82
static void replaceWithConstant (Constant *Value,
83
83
SmallVectorImpl<CoroSubFnInst *> &Users) {
84
- if (Users.empty ())
85
- return ;
86
-
87
- // See if we need to bitcast the constant to match the type of the intrinsic
88
- // being replaced. Note: All coro.subfn.addr intrinsics return the same type,
89
- // so we only need to examine the type of the first one in the list.
90
- Type *IntrTy = Users.front ()->getType ();
91
- Type *ValueTy = Value->getType ();
92
- if (ValueTy != IntrTy) {
93
- // May need to tweak the function type to match the type expected at the
94
- // use site.
95
- assert (ValueTy->isPointerTy () && IntrTy->isPointerTy ());
96
- Value = ConstantExpr::getBitCast (Value, IntrTy);
97
- }
98
-
99
- // Now the value type matches the type of the intrinsic. Replace them all!
100
84
for (CoroSubFnInst *I : Users)
101
85
replaceAndRecursivelySimplify (I, Value);
102
86
}
You can’t perform that action at this time.
0 commit comments