@@ -133,7 +133,7 @@ class Writer {
133
133
void Writer::calculateCustomSections () {
134
134
log (" calculateCustomSections" );
135
135
bool stripDebug = config->stripDebug || config->stripAll ;
136
- for (ObjFile *file : symtab-> objectFiles ) {
136
+ for (ObjFile *file : ctx. objectFiles ) {
137
137
for (InputChunk *section : file->customSections ) {
138
138
// Exclude COMDAT sections that are not selected for inclusion
139
139
if (section->discarded )
@@ -207,7 +207,7 @@ void Writer::createRelocSections() {
207
207
}
208
208
209
209
void Writer::populateProducers () {
210
- for (ObjFile *file : symtab-> objectFiles ) {
210
+ for (ObjFile *file : ctx. objectFiles ) {
211
211
const WasmProducerInfo &info = file->getWasmObj ()->getProducerInfo ();
212
212
out.producersSec ->addInfo (info);
213
213
}
@@ -591,7 +591,7 @@ void Writer::populateTargetFeatures() {
591
591
}
592
592
593
593
// Find the sets of used, required, and disallowed features
594
- for (ObjFile *file : symtab-> objectFiles ) {
594
+ for (ObjFile *file : ctx. objectFiles ) {
595
595
StringRef fileName (file->getName ());
596
596
for (auto &feature : file->getWasmObj ()->getTargetFeatures ()) {
597
597
switch (feature.Prefix ) {
@@ -654,7 +654,7 @@ void Writer::populateTargetFeatures() {
654
654
}
655
655
656
656
// Validate the required and disallowed constraints for each file
657
- for (ObjFile *file : symtab-> objectFiles ) {
657
+ for (ObjFile *file : ctx. objectFiles ) {
658
658
StringRef fileName (file->getName ());
659
659
SmallSet<std::string, 8 > objectFeatures;
660
660
for (const auto &feature : file->getWasmObj ()->getTargetFeatures ()) {
@@ -832,7 +832,7 @@ void Writer::populateSymtab() {
832
832
if (sym->isUsedInRegularObj && sym->isLive ())
833
833
out.linkingSec ->addToSymtab (sym);
834
834
835
- for (ObjFile *file : symtab-> objectFiles ) {
835
+ for (ObjFile *file : ctx. objectFiles ) {
836
836
LLVM_DEBUG (dbgs () << " Local symtab entries: " << file->getName () << " \n " );
837
837
for (Symbol *sym : file->getSymbols ())
838
838
if (sym->isLocal () && !isa<SectionSymbol>(sym) && sym->isLive ())
@@ -848,7 +848,7 @@ void Writer::calculateTypes() {
848
848
// 4. The signatures of all imported tags
849
849
// 5. The signatures of all defined tags
850
850
851
- for (ObjFile *file : symtab-> objectFiles ) {
851
+ for (ObjFile *file : ctx. objectFiles ) {
852
852
ArrayRef<WasmSignature> types = file->getWasmObj ()->types ();
853
853
for (uint32_t i = 0 ; i < types.size (); i++)
854
854
if (file->typeIsUsed [i])
@@ -939,7 +939,7 @@ static void finalizeIndirectFunctionTable() {
939
939
}
940
940
941
941
static void scanRelocations () {
942
- for (ObjFile *file : symtab-> objectFiles ) {
942
+ for (ObjFile *file : ctx. objectFiles ) {
943
943
LLVM_DEBUG (dbgs () << " scanRelocations: " << file->getName () << " \n " );
944
944
for (InputChunk *chunk : file->functions )
945
945
scanRelocations (chunk);
@@ -955,37 +955,37 @@ void Writer::assignIndexes() {
955
955
// global are effected by the number of imports.
956
956
out.importSec ->seal ();
957
957
958
- for (InputFunction *func : symtab-> syntheticFunctions )
958
+ for (InputFunction *func : ctx. syntheticFunctions )
959
959
out.functionSec ->addFunction (func);
960
960
961
- for (ObjFile *file : symtab-> objectFiles ) {
961
+ for (ObjFile *file : ctx. objectFiles ) {
962
962
LLVM_DEBUG (dbgs () << " Functions: " << file->getName () << " \n " );
963
963
for (InputFunction *func : file->functions )
964
964
out.functionSec ->addFunction (func);
965
965
}
966
966
967
- for (InputGlobal *global : symtab-> syntheticGlobals )
967
+ for (InputGlobal *global : ctx. syntheticGlobals )
968
968
out.globalSec ->addGlobal (global);
969
969
970
- for (ObjFile *file : symtab-> objectFiles ) {
970
+ for (ObjFile *file : ctx. objectFiles ) {
971
971
LLVM_DEBUG (dbgs () << " Globals: " << file->getName () << " \n " );
972
972
for (InputGlobal *global : file->globals )
973
973
out.globalSec ->addGlobal (global);
974
974
}
975
975
976
- for (ObjFile *file : symtab-> objectFiles ) {
976
+ for (ObjFile *file : ctx. objectFiles ) {
977
977
LLVM_DEBUG (dbgs () << " Tags: " << file->getName () << " \n " );
978
978
for (InputTag *tag : file->tags )
979
979
out.tagSec ->addTag (tag);
980
980
}
981
981
982
- for (ObjFile *file : symtab-> objectFiles ) {
982
+ for (ObjFile *file : ctx. objectFiles ) {
983
983
LLVM_DEBUG (dbgs () << " Tables: " << file->getName () << " \n " );
984
984
for (InputTable *table : file->tables )
985
985
out.tableSec ->addTable (table);
986
986
}
987
987
988
- for (InputTable *table : symtab-> syntheticTables )
988
+ for (InputTable *table : ctx. syntheticTables )
989
989
out.tableSec ->addTable (table);
990
990
991
991
out.globalSec ->assignIndexes ();
@@ -1022,7 +1022,7 @@ OutputSegment *Writer::createOutputSegment(StringRef name) {
1022
1022
}
1023
1023
1024
1024
void Writer::createOutputSegments () {
1025
- for (ObjFile *file : symtab-> objectFiles ) {
1025
+ for (ObjFile *file : ctx. objectFiles ) {
1026
1026
for (InputChunk *segment : file->segments ) {
1027
1027
if (!segment->live )
1028
1028
continue ;
@@ -1639,7 +1639,7 @@ void Writer::calculateInitFunctions() {
1639
1639
if (!config->relocatable && !WasmSym::callCtors->isLive ())
1640
1640
return ;
1641
1641
1642
- for (ObjFile *file : symtab-> objectFiles ) {
1642
+ for (ObjFile *file : ctx. objectFiles ) {
1643
1643
const WasmLinkingData &l = file->getWasmObj ()->linkingData ();
1644
1644
for (const WasmInitFunc &f : l.InitFunctions ) {
1645
1645
FunctionSymbol *sym = file->getFunctionSymbol (f.Symbol );
0 commit comments