Skip to content

Commit

Permalink
asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
mtrofin committed Dec 14, 2023
1 parent e428d7b commit df23812
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions llvm/lib/Transforms/IPO/FunctionImport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,12 @@ class WorkloadImportsManager : public ModuleImportsManager {
<< ". This is unexpected. Are module paths passed to the "
"compiler unique for the modules passed to the linker?");
GVS = *PotentialCandidates.begin();
// We could in theory have multiple (interposable) copies of a symbol
// when there is no prevailing candidate, if say the prevailing copy was
// in a native object being linked in. However, we should in theory be
// marking all of these non-prevailing IR copies dead in that case, in
// which case they won't be candidates.
assert(GVS->isLive());
} else {
assert(llvm::hasSingleElement(PrevailingCandidates));
GVS = *PrevailingCandidates.begin();
Expand Down

0 comments on commit df23812

Please sign in to comment.