Question about LLVMCDisassembler

Hello,

Could someone answer two questions about this code, please

DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler starting from line 897:

m_reg_info_ap.reset(curr_target->createMCRegInfo(triple));

m_subtarget_info_ap.reset(

curr_target->createMCSubtargetInfo(triple, cpu, features_str));

std::unique_ptrllvm::MCRegisterInfo reg_info(

curr_target->createMCRegInfo(triple));

m_asm_info_ap.reset(curr_target->createMCAsmInfo(*reg_info, triple));

Want to answer my second question: in that case LLVMCDisassembler will be created with m_is_valid = false as it should, but what can happen in create{Target}MCAsmInfo is UB nevertheless. Suppose it is not good, that’s why I created revision D41584.