Skip to content

Commit 08c5138

Browse files
committed
IRGeneratorForStatements does not check for builtin when mangling user identifiers
1 parent a652292 commit 08c5138

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

libsolidity/codegen/ir/IRGeneratorForStatements.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ struct CopyTranslate: public yul::ASTCopier
8484
// from the Yul dialect we are compiling to. So we are assuming here that the builtin
8585
// functions are identical. This should not be a problem for now since everything
8686
// is EVM anyway.
87-
if (m_dialect.findBuiltin(_name.str()))
88-
return _name;
89-
else
90-
return yul::YulName{"usr$" + _name.str()};
87+
return yul::YulName{"usr$" + _name.str()};
9188
}
9289

9390
yul::Identifier translate(yul::Identifier const& _identifier) override

libsolidity/experimental/codegen/IRGeneratorForStatements.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,7 @@ struct CopyTranslate: public yul::ASTCopier
7272

7373
yul::YulName translateIdentifier(yul::YulName _name) override
7474
{
75-
if (m_dialect.findBuiltin(_name.str()))
76-
return _name;
77-
else
78-
return yul::YulName{"usr$" + _name.str()};
75+
return yul::YulName{"usr$" + _name.str()};
7976
}
8077

8178
yul::Identifier translate(yul::Identifier const& _identifier) override

0 commit comments

Comments
 (0)