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_ptr<llvm::MCRegisterInfo> reg_info(
curr_target->createMCRegInfo(triple));
m_asm_info_ap.reset(curr_target->createMCAsmInfo(*reg_info, triple));
1. Why it cannot reuse m_reg_info_ap for createMCAsmInfo instead of
creation reg_info again?
2. It seems that createMCRegInfo can return nullptr. Is it safe to
dereference reg_info in createMCAsmInfo (line 904)?
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev