[llvm] [SandboxIR] Implement UnreachableInst (PR #101856)
Julius Alexandre via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 3 23:13:50 PDT 2024
medievalghoul wrote:
> Hmm does the test actually pass?
>
> For the instruction to be created as a `sanbdoxir::UnreachableInst` we need to add the following code in `Value *Context::getOrCreateValueInternal(llvm::Value *LLVMV, llvm::User *U)`:
>
> ```
> case llvm::Instruction::Unreachable: {
> auto *LLVMUnreachable = cast<llvm::UnreachableInst>(LLVMV);
> It->second = std::unique_ptr<UnreachableInst>(new UnreachableInst(LLVMUnreachable, *this));
> return It->second.get();
> }
> ```
Good catch. Interestingly, the test did pass, but I'm not entirely sure why, if the code you sent me is required. It might be a case of "it works on my computer." I made sure to add it.
https://github.com/llvm/llvm-project/pull/101856
More information about the llvm-commits
mailing list