@@ -133,7 +133,7 @@ class Writer {
133133void Writer::calculateCustomSections () {
134134 log (" calculateCustomSections" );
135135 bool stripDebug = config->stripDebug || config->stripAll ;
136- for (ObjFile *file : symtab-> objectFiles ) {
136+ for (ObjFile *file : ctx. objectFiles ) {
137137 for (InputChunk *section : file->customSections ) {
138138 // Exclude COMDAT sections that are not selected for inclusion
139139 if (section->discarded )
@@ -207,7 +207,7 @@ void Writer::createRelocSections() {
207207}
208208
209209void Writer::populateProducers () {
210- for (ObjFile *file : symtab-> objectFiles ) {
210+ for (ObjFile *file : ctx. objectFiles ) {
211211 const WasmProducerInfo &info = file->getWasmObj ()->getProducerInfo ();
212212 out.producersSec ->addInfo (info);
213213 }
@@ -591,7 +591,7 @@ void Writer::populateTargetFeatures() {
591591 }
592592
593593 // Find the sets of used, required, and disallowed features
594- for (ObjFile *file : symtab-> objectFiles ) {
594+ for (ObjFile *file : ctx. objectFiles ) {
595595 StringRef fileName (file->getName ());
596596 for (auto &feature : file->getWasmObj ()->getTargetFeatures ()) {
597597 switch (feature.Prefix ) {
@@ -654,7 +654,7 @@ void Writer::populateTargetFeatures() {
654654 }
655655
656656 // Validate the required and disallowed constraints for each file
657- for (ObjFile *file : symtab-> objectFiles ) {
657+ for (ObjFile *file : ctx. objectFiles ) {
658658 StringRef fileName (file->getName ());
659659 SmallSet<std::string, 8 > objectFeatures;
660660 for (const auto &feature : file->getWasmObj ()->getTargetFeatures ()) {
@@ -832,7 +832,7 @@ void Writer::populateSymtab() {
832832 if (sym->isUsedInRegularObj && sym->isLive ())
833833 out.linkingSec ->addToSymtab (sym);
834834
835- for (ObjFile *file : symtab-> objectFiles ) {
835+ for (ObjFile *file : ctx. objectFiles ) {
836836 LLVM_DEBUG (dbgs () << " Local symtab entries: " << file->getName () << " \n " );
837837 for (Symbol *sym : file->getSymbols ())
838838 if (sym->isLocal () && !isa<SectionSymbol>(sym) && sym->isLive ())
@@ -848,7 +848,7 @@ void Writer::calculateTypes() {
848848 // 4. The signatures of all imported tags
849849 // 5. The signatures of all defined tags
850850
851- for (ObjFile *file : symtab-> objectFiles ) {
851+ for (ObjFile *file : ctx. objectFiles ) {
852852 ArrayRef<WasmSignature> types = file->getWasmObj ()->types ();
853853 for (uint32_t i = 0 ; i < types.size (); i++)
854854 if (file->typeIsUsed [i])
@@ -939,7 +939,7 @@ static void finalizeIndirectFunctionTable() {
939939}
940940
941941static void scanRelocations () {
942- for (ObjFile *file : symtab-> objectFiles ) {
942+ for (ObjFile *file : ctx. objectFiles ) {
943943 LLVM_DEBUG (dbgs () << " scanRelocations: " << file->getName () << " \n " );
944944 for (InputChunk *chunk : file->functions )
945945 scanRelocations (chunk);
@@ -955,37 +955,37 @@ void Writer::assignIndexes() {
955955 // global are effected by the number of imports.
956956 out.importSec ->seal ();
957957
958- for (InputFunction *func : symtab-> syntheticFunctions )
958+ for (InputFunction *func : ctx. syntheticFunctions )
959959 out.functionSec ->addFunction (func);
960960
961- for (ObjFile *file : symtab-> objectFiles ) {
961+ for (ObjFile *file : ctx. objectFiles ) {
962962 LLVM_DEBUG (dbgs () << " Functions: " << file->getName () << " \n " );
963963 for (InputFunction *func : file->functions )
964964 out.functionSec ->addFunction (func);
965965 }
966966
967- for (InputGlobal *global : symtab-> syntheticGlobals )
967+ for (InputGlobal *global : ctx. syntheticGlobals )
968968 out.globalSec ->addGlobal (global);
969969
970- for (ObjFile *file : symtab-> objectFiles ) {
970+ for (ObjFile *file : ctx. objectFiles ) {
971971 LLVM_DEBUG (dbgs () << " Globals: " << file->getName () << " \n " );
972972 for (InputGlobal *global : file->globals )
973973 out.globalSec ->addGlobal (global);
974974 }
975975
976- for (ObjFile *file : symtab-> objectFiles ) {
976+ for (ObjFile *file : ctx. objectFiles ) {
977977 LLVM_DEBUG (dbgs () << " Tags: " << file->getName () << " \n " );
978978 for (InputTag *tag : file->tags )
979979 out.tagSec ->addTag (tag);
980980 }
981981
982- for (ObjFile *file : symtab-> objectFiles ) {
982+ for (ObjFile *file : ctx. objectFiles ) {
983983 LLVM_DEBUG (dbgs () << " Tables: " << file->getName () << " \n " );
984984 for (InputTable *table : file->tables )
985985 out.tableSec ->addTable (table);
986986 }
987987
988- for (InputTable *table : symtab-> syntheticTables )
988+ for (InputTable *table : ctx. syntheticTables )
989989 out.tableSec ->addTable (table);
990990
991991 out.globalSec ->assignIndexes ();
@@ -1022,7 +1022,7 @@ OutputSegment *Writer::createOutputSegment(StringRef name) {
10221022}
10231023
10241024void Writer::createOutputSegments () {
1025- for (ObjFile *file : symtab-> objectFiles ) {
1025+ for (ObjFile *file : ctx. objectFiles ) {
10261026 for (InputChunk *segment : file->segments ) {
10271027 if (!segment->live )
10281028 continue ;
@@ -1639,7 +1639,7 @@ void Writer::calculateInitFunctions() {
16391639 if (!config->relocatable && !WasmSym::callCtors->isLive ())
16401640 return ;
16411641
1642- for (ObjFile *file : symtab-> objectFiles ) {
1642+ for (ObjFile *file : ctx. objectFiles ) {
16431643 const WasmLinkingData &l = file->getWasmObj ()->linkingData ();
16441644 for (const WasmInitFunc &f : l.InitFunctions ) {
16451645 FunctionSymbol *sym = file->getFunctionSymbol (f.Symbol );
0 commit comments