forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix delete of functions that becomes unused (intel#2109)
After the first loop of deleting instructions in ValuesToDelete, deleted instructions in ValuesToDelete are in an unstable state. Then in the second loop of deleting, dyn_cast to GlobalValue could return true for an instruction and double eraseFromParent causes crash. Global values in ValuesToDelete are functions. Unused functions are deleted by eraseUselessFunctions anyway. Original commit: KhronosGroup/SPIRV-LLVM-Translator@aea1ac7
- Loading branch information
Showing
2 changed files
with
3 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters