================ @@ -282,45 +282,57 @@ static void auxSymMapping(IO &IO, XCOFFYAML::SectAuxEntForStat &AuxSym) { void MappingTraits<std::unique_ptr<XCOFFYAML::AuxSymbolEnt>>::mapping( IO &IO, std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) { - assert(!IO.outputting() && "We don't dump aux symbols currently."); + + auto ResetAuxSym = [&](auto *AuxEnt) { + if (!IO.outputting()) + AuxSym.reset(AuxEnt); ---------------- bzEq wrote:
Might use a templated helper function to replace this lambda. ```c++ template<typename AuxEntT> static void ResetAuxSym(IO &IO, std::unique_ptr<XCOFFYAML::AuxSymbolEnt> &AuxSym) { if (!IO.outputting()) AuxSym.reset(new AuxEntT); } ``` https://github.com/llvm/llvm-project/pull/70642 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits