[llvm] [SandboxIR] Implement UnreachableInst (PR #101856)

Julius Alexandre via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 3 17:33:22 PDT 2024


================
@@ -952,6 +957,44 @@ class StoreInst final : public Instruction {
 #endif
 };
 
+class UnreachableInst final : public Instruction {
+  /// Use UnreachableInst::create() instead of calling the constructor.
+  UnreachableInst(llvm::Instruction *I, Context &Ctx)
+      : Instruction(ClassID::Unreachable, Opcode::Unreachable, I, Ctx) {}
+  UnreachableInst(ClassID SubclassID, llvm::Instruction *I, Context &Ctx)
----------------
medievalghoul wrote:

Do we really need a second constructor in Unreachablelnst for allowing specific ClassID?

https://github.com/llvm/llvm-project/pull/101856


More information about the llvm-commits mailing list