[clang-tools-extra] [llvm] [clang] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)
Kai Luo via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 6 21:24:31 PST 2023
================
@@ -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:
What if `IO.outputting()` is `true`, will `AuxEnt` be deleted?
https://github.com/llvm/llvm-project/pull/70642
More information about the cfe-commits
mailing list