I want to remove an UnreachableInst since a previous transformation has made it reachable. However, calling eraseFromParent() gives me a malformed BasicBlock since the UnreachableInst is the terminator of its BasicBlock. How do I fix the BasicBlock to terminate at the instruction previous to the UnreachableInst?
Related Questions in LLVM
- Hierarchical RDBMS Query spanning across multiple tables with in clause
- Why I can't perform this simple insert operation? How can I solve this date format issue?
- How to import only new data by using Sqoop?
- Making relational algebra equations in a sample database
- adding a where condition for one criteria in sql query
- What happens to sql views, if database is moved to another server
- Why I can't perform this insert query if a specific field value is set to null?
- Star schema role in the Pentaho Mondrian OLAP server
- Can Rails deal with DB uniqueness without index?
- Max. number of subqueries with WHERE clause in MySQL
Related Questions in TERMINATOR
- Hierarchical RDBMS Query spanning across multiple tables with in clause
- Why I can't perform this simple insert operation? How can I solve this date format issue?
- How to import only new data by using Sqoop?
- Making relational algebra equations in a sample database
- adding a where condition for one criteria in sql query
- What happens to sql views, if database is moved to another server
- Why I can't perform this insert query if a specific field value is set to null?
- Star schema role in the Pentaho Mondrian OLAP server
- Can Rails deal with DB uniqueness without index?
- Max. number of subqueries with WHERE clause in MySQL
Related Questions in UNREACHABLE-STATEMENT
- Hierarchical RDBMS Query spanning across multiple tables with in clause
- Why I can't perform this simple insert operation? How can I solve this date format issue?
- How to import only new data by using Sqoop?
- Making relational algebra equations in a sample database
- adding a where condition for one criteria in sql query
- What happens to sql views, if database is moved to another server
- Why I can't perform this insert query if a specific field value is set to null?
- Star schema role in the Pentaho Mondrian OLAP server
- Can Rails deal with DB uniqueness without index?
- Max. number of subqueries with WHERE clause in MySQL
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Every basic block must end with a terminator. I think that the most straightforward way to remove the unreachable instruction, then, is to replace it with another terminator - for example, a branch into the next basic block, a return instruction, etc.
Take a look at
llvm::ReplaceInstWithInst
in BasicBlockUtils.h for a convenient way to replace one instruction with another.