Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4137a6

Browse files
committed
[orc-rt] Relax addUnique assertion to match error condition.
Duplicates are now permitted as long as they're identical (dbdf1ac).
1 parent 350385e commit c4137a6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

orc-rt/include/orc-rt/SimpleSymbolTable.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ class SimpleSymbolTable {
6767

6868
// No duplicates. Add entries.
6969
for (auto &P : NewSymbols) {
70-
[[maybe_unused]] bool Added = Symbols.insert(P).second;
71-
assert(Added && "NewSymbols contains duplicate definitions");
70+
[[maybe_unused]] auto [I, Added] = Symbols.insert(P);
71+
assert((Added || I->second == P.second) &&
72+
"NewSymbols contains incompatible definitions");
7273
}
7374

7475
return Error::success();

0 commit comments

Comments
 (0)