HomePhabricator

[LLParser] Delete temp CallInst when error occurs

Authored by qiucf on Jun 15 2020, 8:41 PM.

Description

[LLParser] Delete temp CallInst when error occurs

Only functions with floating-point return type accepts fast-math flags.
When adding such flags to function returning integer, we'll see a crash,
because there's still an undeleted value referencing the argument. This
patch manually removes the temporary instruction when error occurs.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D78355

Details