[Lldb-commits] [PATCH] D101921: [MC] Make it possible for targets to define their own MCObjectFileInfo

Fangrui Song via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 12 09:44:15 PDT 2021


MaskRay added a comment.

Can `createMCObjectFileInfo` return `MCObjectFileInfo` instead of `std::unique_ptr<MCObjectFileInfo>`?



================
Comment at: clang/lib/Parse/ParseStmtAsm.cpp:590
+
   if (!MAI || !MII || !MOFI || !STI) {
     Diag(AsmLoc, diag::err_msasm_unable_to_create_target)
----------------
Can `MOFI` be null? (i.e. can createMCObjectFileInfo guarantee no-null return value?)

Consider moving the construction below the checks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101921/new/

https://reviews.llvm.org/D101921



More information about the lldb-commits mailing list