flip1995 added a comment. In D101921#2754426 <https://reviews.llvm.org/D101921#2754426>, @MaskRay wrote:
> Can `createMCObjectFileInfo` return `MCObjectFileInfo` instead of > `std::unique_ptr<MCObjectFileInfo>`? `createMCObjectfileInfo` returns a `MCObjectFileInfo *` similar to every other `create*` function in `TargetRegistry.h`. ================ Comment at: clang/lib/Parse/ParseStmtAsm.cpp:590 + if (!MAI || !MII || !MOFI || !STI) { Diag(AsmLoc, diag::err_msasm_unable_to_create_target) ---------------- MaskRay wrote: > Can `MOFI` be null? (i.e. can createMCObjectFileInfo guarantee no-null return > value?) > > Consider moving the construction below the checks. You're right. The `createMCObjectFileInfo` always returns a no-null value. I'll move the construction and remove the check for `MOFI`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101921/new/ https://reviews.llvm.org/D101921 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits