Skip to content

Commit 47043cc

Browse files
r0qscameel
authored andcommitted
Fix style
1 parent 7e4b05b commit 47043cc

File tree

1 file changed

+39
-40
lines changed

1 file changed

+39
-40
lines changed

Diff for: libsolidity/experimental/codegen/IRVariable.h

+39-40
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
/*
2-
This file is part of solidity.
2+
This file is part of solidity.
33
4-
solidity is free software: you can redistribute it and/or modify
5-
it under the terms of the GNU General Public License as published by
6-
the Free Software Foundation, either version 3 of the License, or
7-
(at your option) any later version.
4+
solidity is free software: you can redistribute it and/or modify
5+
it under the terms of the GNU General Public License as published by
6+
the Free Software Foundation, either version 3 of the License, or
7+
(at your option) any later version.
88
9-
solidity is distributed in the hope that it will be useful,
10-
but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
GNU General Public License for more details.
9+
solidity is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
1313
14-
You should have received a copy of the GNU General Public License
15-
along with solidity. If not, see <http://www.gnu.org/licenses/>.
14+
You should have received a copy of the GNU General Public License
15+
along with solidity. If not, see <http://www.gnu.org/licenses/>.
1616
*/
1717
// SPDX-License-Identifier: GPL-3.0
1818

@@ -42,44 +42,43 @@ class IRVariable
4242
{
4343

4444
public:
45-
/// IR variable with explicit base name @a _baseName and type @a _type.
46-
IRVariable(std::string _baseName, Type _type, size_t _stackSize);
47-
/// IR variable referring to the declaration @a _decl.
48-
explicit IRVariable(VariableDeclaration const& _decl, Type _type, size_t _stackSize);
49-
/// IR variable referring to the expression @a _expr.
50-
/// Intentionally not defined as explicit to allow defining IRVariables for expressions directly via implicit conversions.
51-
IRVariable(Expression const& _expression, Type _type, size_t _stackSize);
45+
/// IR variable with explicit base name @a _baseName and type @a _type.
46+
IRVariable(std::string _baseName, Type _type, size_t _stackSize);
47+
/// IR variable referring to the declaration @a _decl.
48+
explicit IRVariable(VariableDeclaration const& _decl, Type _type, size_t _stackSize);
49+
/// IR variable referring to the expression @a _expr.
50+
/// Intentionally not defined as explicit to allow defining IRVariables for expressions directly via implicit conversions.
51+
IRVariable(Expression const& _expression, Type _type, size_t _stackSize);
5252

53-
/// @returns the name of the variable, if it occupies a single stack slot (otherwise throws).
54-
std::string name() const;
53+
/// @returns the name of the variable, if it occupies a single stack slot (otherwise throws).
54+
std::string name() const;
5555

56-
/// @returns a comma-separated list of the stack slots of the variable.
57-
std::string commaSeparatedList() const;
56+
/// @returns a comma-separated list of the stack slots of the variable.
57+
std::string commaSeparatedList() const;
5858

59-
/// @returns a comma-separated list of the stack slots of the variable that is
60-
/// prefixed with a comma, unless it is empty.
61-
std::string commaSeparatedListPrefixed() const;
59+
/// @returns a comma-separated list of the stack slots of the variable that is
60+
/// prefixed with a comma, unless it is empty.
61+
std::string commaSeparatedListPrefixed() const;
6262

63-
/// @returns an IRVariable referring to the tuple component @a _i of a tuple variable.
64-
IRVariable tupleComponent(std::size_t _i) const;
63+
/// @returns an IRVariable referring to the tuple component @a _i of a tuple variable.
64+
IRVariable tupleComponent(std::size_t _i) const;
6565

66-
/// @returns the type of the variable.
67-
Type type() const { return m_type; }
66+
/// @returns the type of the variable.
67+
Type type() const { return m_type; }
6868

69-
/// @returns the stack size of the variable.
70-
size_t stackSize() const { return m_stackSize; }
69+
/// @returns the stack size of the variable.
70+
size_t stackSize() const { return m_stackSize; }
7171

72-
/// @returns a vector containing the names of the stack slots of the variable.
73-
std::vector<std::string> stackSlots() const;
72+
/// @returns a vector containing the names of the stack slots of the variable.
73+
std::vector<std::string> stackSlots() const;
7474

7575
private:
76-
/// @returns a name consisting of the base name appended with an underscore and @a _suffix,
77-
/// unless @a _suffix is empty, in which case the base name itself is returned.
78-
std::string suffixedName(std::string const& _suffix) const;
79-
std::string m_baseName;
80-
Type m_type;
81-
size_t m_stackSize;
76+
/// @returns a name consisting of the base name appended with an underscore and @a _suffix,
77+
/// unless @a _suffix is empty, in which case the base name itself is returned.
78+
std::string suffixedName(std::string const& _suffix) const;
79+
std::string m_baseName;
80+
Type m_type;
81+
size_t m_stackSize;
8282
};
8383

84-
8584
}

0 commit comments

Comments
 (0)