Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make base type of PASS enum ubyte #13215

Merged
merged 1 commit into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dmd/dsymbol.d
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct Visibility
}
}

enum PASS : int
enum PASS : ubyte
{
init, // initial state
semantic, // semantic() started
Expand Down
16 changes: 15 additions & 1 deletion src/dmd/dsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,21 @@ struct Visibility

/* State of symbol in winding its way through the passes of the compiler
*/
enum PASS
enum class PASS : uint8_t
{
init, // initial state
semantic, // semantic() started
semanticdone, // semantic() done
semantic2, // semantic2() started
semantic2done, // semantic2() done
semantic3, // semantic3() started
semantic3done, // semantic3() done
inline_, // inline started
inlinedone, // inline done
obj // toObjFile() run
};

enum
{
PASSinit, // initial state
PASSsemantic, // semantic() started
Expand Down
24 changes: 12 additions & 12 deletions src/dmd/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -918,18 +918,18 @@ struct Loc final
}
};

enum class PASS
{
init = 0,
semantic = 1,
semanticdone = 2,
semantic2 = 3,
semantic2done = 4,
semantic3 = 5,
semantic3done = 6,
inline_ = 7,
inlinedone = 8,
obj = 9,
enum class PASS : uint8_t
{
init = 0u,
semantic = 1u,
semanticdone = 2u,
semantic2 = 3u,
semantic2done = 4u,
semantic3 = 5u,
semantic3done = 6u,
inline_ = 7u,
inlinedone = 8u,
obj = 9u,
};

struct Ungag final
Expand Down