@@ -126,7 +126,7 @@ void SymbolTable::reportRemainingUndefines() {
126126 Symbol *Imp = find (Name.substr (strlen (" __imp_" )));
127127 if (Imp && isa<Defined>(Imp)) {
128128 auto *D = cast<Defined>(Imp);
129- replaceBody <DefinedLocalImport>(Sym, Name, D);
129+ replaceSymbol <DefinedLocalImport>(Sym, Name, D);
130130 LocalImportChunks.push_back (cast<DefinedLocalImport>(Sym)->getChunk ());
131131 continue ;
132132 }
@@ -135,7 +135,7 @@ void SymbolTable::reportRemainingUndefines() {
135135 // Remaining undefined symbols are not fatal if /force is specified.
136136 // They are replaced with dummy defined symbols.
137137 if (Config->Force )
138- replaceBody <DefinedAbsolute>(Sym, Name, 0 );
138+ replaceSymbol <DefinedAbsolute>(Sym, Name, 0 );
139139 Undefs.insert (Sym);
140140 }
141141
@@ -170,7 +170,7 @@ Symbol *SymbolTable::addUndefined(StringRef Name, InputFile *F,
170170 if (!F || !isa<BitcodeFile>(F))
171171 S->IsUsedInRegularObj = true ;
172172 if (WasInserted || (isa<Lazy>(S) && IsWeakAlias)) {
173- replaceBody <Undefined>(S, Name);
173+ replaceSymbol <Undefined>(S, Name);
174174 return S;
175175 }
176176 if (auto *L = dyn_cast<Lazy>(S)) {
@@ -188,7 +188,7 @@ void SymbolTable::addLazy(ArchiveFile *F, const Archive::Symbol Sym) {
188188 bool WasInserted;
189189 std::tie (S, WasInserted) = insert (Name);
190190 if (WasInserted) {
191- replaceBody <Lazy>(S, F, Sym);
191+ replaceSymbol <Lazy>(S, F, Sym);
192192 return ;
193193 }
194194 auto *U = dyn_cast<Undefined>(S);
@@ -210,7 +210,7 @@ Symbol *SymbolTable::addAbsolute(StringRef N, COFFSymbolRef Sym) {
210210 std::tie (S, WasInserted) = insert (N);
211211 S->IsUsedInRegularObj = true ;
212212 if (WasInserted || isa<Undefined>(S) || isa<Lazy>(S))
213- replaceBody <DefinedAbsolute>(S, N, Sym);
213+ replaceSymbol <DefinedAbsolute>(S, N, Sym);
214214 else if (!isa<DefinedCOFF>(S))
215215 reportDuplicate (S, nullptr );
216216 return S;
@@ -222,7 +222,7 @@ Symbol *SymbolTable::addAbsolute(StringRef N, uint64_t VA) {
222222 std::tie (S, WasInserted) = insert (N);
223223 S->IsUsedInRegularObj = true ;
224224 if (WasInserted || isa<Undefined>(S) || isa<Lazy>(S))
225- replaceBody <DefinedAbsolute>(S, N, VA);
225+ replaceSymbol <DefinedAbsolute>(S, N, VA);
226226 else if (!isa<DefinedCOFF>(S))
227227 reportDuplicate (S, nullptr );
228228 return S;
@@ -234,7 +234,7 @@ Symbol *SymbolTable::addSynthetic(StringRef N, Chunk *C) {
234234 std::tie (S, WasInserted) = insert (N);
235235 S->IsUsedInRegularObj = true ;
236236 if (WasInserted || isa<Undefined>(S) || isa<Lazy>(S))
237- replaceBody <DefinedSynthetic>(S, N, C);
237+ replaceSymbol <DefinedSynthetic>(S, N, C);
238238 else if (!isa<DefinedCOFF>(S))
239239 reportDuplicate (S, nullptr );
240240 return S;
@@ -252,7 +252,8 @@ Symbol *SymbolTable::addRegular(InputFile *F, StringRef N, bool IsCOMDAT,
252252 if (SP == SP_CONFLICT) {
253253 reportDuplicate (S, F);
254254 } else if (SP == SP_NEW) {
255- replaceBody<DefinedRegular>(S, F, N, IsCOMDAT, /* IsExternal*/ true , Sym, C);
255+ replaceSymbol<DefinedRegular>(S, F, N, IsCOMDAT, /* IsExternal*/ true , Sym,
256+ C);
256257 } else if (SP == SP_EXISTING && IsCOMDAT && C) {
257258 C->markDiscarded ();
258259 // Discard associative chunks that we've parsed so far. No need to recurse
@@ -271,10 +272,10 @@ Symbol *SymbolTable::addCommon(InputFile *F, StringRef N, uint64_t Size,
271272 if (!isa<BitcodeFile>(F))
272273 S->IsUsedInRegularObj = true ;
273274 if (WasInserted || !isa<DefinedCOFF>(S))
274- replaceBody <DefinedCommon>(S, F, N, Size, Sym, C);
275+ replaceSymbol <DefinedCommon>(S, F, N, Size, Sym, C);
275276 else if (auto *DC = dyn_cast<DefinedCommon>(S))
276277 if (Size > DC->getSize ())
277- replaceBody <DefinedCommon>(S, F, N, Size, Sym, C);
278+ replaceSymbol <DefinedCommon>(S, F, N, Size, Sym, C);
278279 return S;
279280}
280281
@@ -284,7 +285,7 @@ DefinedImportData *SymbolTable::addImportData(StringRef N, ImportFile *F) {
284285 std::tie (S, WasInserted) = insert (N);
285286 S->IsUsedInRegularObj = true ;
286287 if (WasInserted || isa<Undefined>(S) || isa<Lazy>(S)) {
287- replaceBody <DefinedImportData>(S, N, F);
288+ replaceSymbol <DefinedImportData>(S, N, F);
288289 return cast<DefinedImportData>(S);
289290 }
290291
@@ -300,7 +301,7 @@ DefinedImportThunk *SymbolTable::addImportThunk(StringRef Name,
300301 std::tie (S, WasInserted) = insert (Name);
301302 S->IsUsedInRegularObj = true ;
302303 if (WasInserted || isa<Undefined>(S) || isa<Lazy>(S)) {
303- replaceBody <DefinedImportThunk>(S, Name, ID, Machine);
304+ replaceSymbol <DefinedImportThunk>(S, Name, ID, Machine);
304305 return cast<DefinedImportThunk>(S);
305306 }
306307
0 commit comments