lhames added inline comments.

================
Comment at: llvm/tools/llc/llc.cpp:697-700
+    auto &Ctx = MMIWP->getMMI().getContext();
+    Ctx.setGenDwarfForAssembly(Target->Options.ForceDwarfFrameSection);
     const_cast<TargetLoweringObjectFile *>(LLVMTM.getObjFileLowering())
+        ->Initialize(Ctx, *Target);
----------------
int3 wrote:
> int3 wrote:
> > lhames wrote:
> > > This option hand-off feels very manual. I wonder if we should add a 
> > > `propagateTargetOptionsToMC` function, but maybe the set of options that 
> > > it would apply to is small enough not to bother for now?
> > > 
> > > I would add something like this to `LLVMTargetMachine::addPassesToEmitMC` 
> > > too, for the the case where the caller passes in a null `MCContext*`. 
> > thanks for the pointers! I'll look into that
> actually, I'm not sure I understood your suggestion... which class do you 
> envision `propagateTargetOptionsToMC` being defined in? How would it make 
> things "less manual"?
Oh! `TargetOptions` has an `MCTargetOptions` member already. If 
`GenDwarfUnwindInfo` === `ForceDwarfUnwindInfo`, could you just sink 
`ForceDwarfUnwindInfo` into `MCTargetOptions`? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122258

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to