[PATCH] D91313: Add MachineModuleInfo constructor with external MCContext

James Molloy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 07:41:10 PST 2020


jmolloy accepted this revision.
jmolloy added a comment.

Looks reasonable to me. I'd have probably done something like:

MCContext& Context; // not owned, used for all accesses;
optional<MCContext> LocalContextStorage;

MachineModuleInfo() :

  LocalContextStorage(), Context(LocalContextStorage) {

}

MachineModuleInfo(MCContext* Context) :

  Context(*Context) {

}

But your way is fine too.


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

https://reviews.llvm.org/D91313



More information about the llvm-commits mailing list