File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -223,14 +223,12 @@ BasicBlock::~BasicBlock() {
223223 // nodes. There are no other possible uses at this point.
224224 if (hasAddressTaken ()) {
225225 assert (!use_empty () && " There should be at least one blockaddress!" );
226- Constant *Replacement =
227- ConstantInt::get (llvm::Type::getInt32Ty (getContext ()), 1 );
228- while (!use_empty ()) {
229- BlockAddress *BA = cast<BlockAddress>(user_back ());
230- BA->replaceAllUsesWith (ConstantExpr::getIntToPtr (Replacement,
231- BA->getType ()));
232- BA->destroyConstant ();
233- }
226+ BlockAddress *BA = cast<BlockAddress>(user_back ());
227+
228+ Constant *Replacement = ConstantInt::get (Type::getInt32Ty (getContext ()), 1 );
229+ BA->replaceAllUsesWith (
230+ ConstantExpr::getIntToPtr (Replacement, BA->getType ()));
231+ BA->destroyConstant ();
234232 }
235233
236234 assert (getParent () == nullptr && " BasicBlock still linked into the program!" );
You can’t perform that action at this time.
0 commit comments