Skip to content

Commit df23812

Browse files
committed
asserts
1 parent e428d7b commit df23812

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/lib/Transforms/IPO/FunctionImport.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,12 @@ class WorkloadImportsManager : public ModuleImportsManager {
515515
<< ". This is unexpected. Are module paths passed to the "
516516
"compiler unique for the modules passed to the linker?");
517517
GVS = *PotentialCandidates.begin();
518+
// We could in theory have multiple (interposable) copies of a symbol
519+
// when there is no prevailing candidate, if say the prevailing copy was
520+
// in a native object being linked in. However, we should in theory be
521+
// marking all of these non-prevailing IR copies dead in that case, in
522+
// which case they won't be candidates.
523+
assert(GVS->isLive());
518524
} else {
519525
assert(llvm::hasSingleElement(PrevailingCandidates));
520526
GVS = *PrevailingCandidates.begin();

0 commit comments

Comments
 (0)