Skip to content

Commit

Permalink
Do not compare types via getTypeID
Browse files Browse the repository at this point in the history
A logic issue has been addressed with improved checking.
  • Loading branch information
antoniofrighetto committed Nov 14, 2023
1 parent e5a1913 commit 15062e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/passes/strings-encoding/StringEncoding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ bool StringEncoding::injectOnStackLoop(BasicBlock& BB, Instruction& I, Use& Op,
for (size_t i = 0; i < NewF->arg_size(); ++i) {
auto* E = NewF->getFunctionType()->getParamType(i);
auto* V = Args[i]->getType();
if (E->getTypeID() != V->getTypeID()) {
if (E != V) {
std::string err = fmt::format("Args #{}: Expecting {} while it is {}",
i, ToString(*E), ToString(*V));
fatalError(err.c_str());
Expand Down

0 comments on commit 15062e6

Please sign in to comment.