Build warning: Fix #2167: Remove nested reuse of 'unreachable'.
authorJohn Kessenich <cepheus@frii.com>
Wed, 1 Apr 2020 06:46:57 +0000 (00:46 -0600)
committerJohn Kessenich <cepheus@frii.com>
Wed, 1 Apr 2020 06:46:57 +0000 (00:46 -0600)
SPIRV/spvIR.h

index cf6a711..6523035 100755 (executable)
@@ -235,8 +235,7 @@ public:
         assert(instructions.size() > 0);
         instructions.resize(1);
         successors.clear();
-        Instruction* unreachable = new Instruction(OpUnreachable);
-        addInstruction(std::unique_ptr<Instruction>(unreachable));
+        addInstruction(std::unique_ptr<Instruction>(new Instruction(OpUnreachable)));
     }
     // Change this block into a canonical dead continue target branching to the
     // given header ID.  Delete instructions as necessary.  A canonical dead continue