[llvm] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 00:32:47 PST 2023


================
@@ -131,7 +209,119 @@ Error XCOFFDumper::dumpSymbols() {
 
     Sym.Type = SymbolEntRef.getSymbolType();
     Sym.StorageClass = SymbolEntRef.getStorageClass();
-    Sym.NumberOfAuxEntries = SymbolEntRef.getNumberOfAuxEntries();
+    uint8_t NumOfAuxSym = SymbolEntRef.getNumberOfAuxEntries();
+    Sym.NumberOfAuxEntries = NumOfAuxSym;
+
+    if (NumOfAuxSym) {
+      std::vector<std::unique_ptr<XCOFFYAML::AuxSymbolEnt>> AuxEntTbl;
+      switch (Sym.StorageClass) {
+      case XCOFF::C_FILE: {
+        for (uint8_t I = 1; I <= NumOfAuxSym; ++I) {
----------------
jh7370 wrote:

This loop is still inline in the switch when I asked for it to be pulled out into its own function. Please address all my comments or explicitly say you're either not doing them (and why not) or that you're going to do them in a different diff update. See https://llvm.org/docs/CodeReview.html#acknowledge-all-reviewer-feedback.

https://github.com/llvm/llvm-project/pull/70642


More information about the llvm-commits mailing list