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

cfg: Add some doc comments for commonly used fields. #210

Merged
merged 1 commit into from
Jul 9, 2024
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
4 changes: 3 additions & 1 deletion cfg/CFG.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ class BlockExit final {
/// for different parts of the RHS.
class Binding final {
public:
/// LHS for a single "assignment" in the CFG.
VariableUseSite bind;
/// Location for the full "assignment" (use bind.loc if you need the location for the LHS only).
core::LocOffsets loc;

/// RHS for a single "assignment" in the CFG.
InstructionPtr value;

Binding(LocalOccurrence bind, core::LocOffsets loc, InstructionPtr value);
Expand Down
1 change: 1 addition & 0 deletions cfg/Instructions.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class VariableUseSite final {
public:
LocalRef variable;
core::TypePtr type;
/// Location for the LHS of an "assignment" in the CFG.
core::LocOffsets loc;
VariableUseSite() = default;
VariableUseSite(LocalRef local) : variable(local){};
Expand Down
Loading