https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/180464
Except MC-internal `MCAsmInfo()` uses, MCAsmInfo is always constructed with `const MCTargetOptions &` via `TargetRegistry::createMCAsmInfo` (https://reviews.llvm.org/D41349). Store the pointer in MCAsmInfo and change `MCContext::getTargetOptions()` to retrieve it from there, removing the `MCTargetOptions const *TargetOptions` member from MCContext. MCContext's constructor still accepts an MCTargetOptions parameter for now. An assert verifies it matches MCAsmInfo's copy when provided. A subsequent change will remove this parameter and update all callers. In addition, assert that MCTargetOptions is non-null in the MCAssembler constructor and remove the now-unnecessary null checks in ELFObjectWriter. _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
