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

Philipp Krones via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 26 03:47:42 PDT 2021


flip1995 added inline comments.


================
Comment at: llvm/include/llvm/Support/TargetRegistry.h:26
 #include "llvm/ADT/iterator_range.h"
+#include "llvm/MC/MCObjectFileInfo.h"
 #include "llvm/Support/CodeGen.h"
----------------
flip1995 wrote:
> MaskRay wrote:
> > `include/llvm/Support/TargetRegistry.h now has cyclic dependency on include/MC/*.h`.
> > 
> > The previous style isn't good as well: `include/llvm/Support/TargetRegistry.h` has forward declarations of a number of MC* classes.
> > 
> > I think this header probably should be moved to lib/Target.
> > `include/llvm/Support/TargetRegistry.h now has cyclic dependency on include/MC/*.h`
> 
> I'll submit a quick fix changing this to a forward decl.
> 
> > I think this header probably should be moved to lib/Target.
> 
> The whole `TargetRegistry.h` header? 
> I'll submit a quick fix changing this to a forward decl.

I just noticed, that this isn't as easy, as I would've thought, since the MOFI is constructed if no `createMCObjectFileInfo` callback function is defined by the target.


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