File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -278,9 +278,7 @@ void ICF::run() {
278278 uint32_t hash = isec->icfEqClass [icfPass % 2 ];
279279 for (const Reloc &r : isec->relocs ) {
280280 if (auto *sym = r.referent .dyn_cast <Symbol *>()) {
281- if (auto *dylibSym = dyn_cast<DylibSymbol>(sym))
282- hash += dylibSym->stubsHelperIndex ;
283- else if (auto *defined = dyn_cast<Defined>(sym)) {
281+ if (auto *defined = dyn_cast<Defined>(sym)) {
284282 if (defined ->isec ) {
285283 if (auto referentIsec =
286284 dyn_cast<ConcatInputSection>(defined ->isec ))
@@ -291,8 +289,10 @@ void ICF::run() {
291289 } else {
292290 hash += defined ->value ;
293291 }
294- } else if (!isa<Undefined>(sym)) // ICF runs before Undefined diags.
295- llvm_unreachable (" foldIdenticalSections symbol kind" );
292+ } else {
293+ // ICF runs before Undefined diags
294+ assert (isa<Undefined>(sym) || isa<DylibSymbol>(sym));
295+ }
296296 }
297297 }
298298 // Set MSB to 1 to avoid collisions with non-hashed classes.
You can’t perform that action at this time.
0 commit comments