Skip to content

Mir pretty print: Add cleanup comment #44919

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

Merged
merged 1 commit into from
Oct 1, 2017
Merged

Conversation

diwic
Copy link
Contributor

@diwic diwic commented Sep 29, 2017

I found it useful to add a comment indicating whether or not a
BasicBlock is a cleanup block or not. Hopefully you'll find it
useful too.

I found it useful to add a comment indicating whether or not a
BasicBlock is a cleanup block or not. Hopefully you'll find it
useful too.
@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @arielb1 (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@diwic
Copy link
Contributor Author

diwic commented Sep 29, 2017

Example:

bb1: {                              
    _2 = const middle() -> [return: bb2, unwind: bb4]; // scope 1 at /tmp/main.rs:7:2: 7:10
}

bb2: {                              
    _0 = ();                         // scope 0 at /tmp/main.rs:5:11: 8:2
    drop(_1) -> bb5;                 // scope 0 at /tmp/main.rs:8:2: 8:2
}

bb3: {                               // cleanup
    resume;                          // scope 0 at /tmp/main.rs:5:1: 8:2
}

bb4: {                               // cleanup
    drop(_1) -> bb3;                 // scope 0 at /tmp/main.rs:8:2: 8:2
}

bb5: {                              
    StorageDead(_1);                 // scope 0 at /tmp/main.rs:8:2: 8:2
    return;                          // scope 0 at /tmp/main.rs:8:2: 8:2
}

@shepmaster shepmaster added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 29, 2017
@arielb1
Copy link
Contributor

arielb1 commented Oct 1, 2017

@bors r+

@bors
Copy link
Collaborator

bors commented Oct 1, 2017

📌 Commit 6f8b69f has been approved by arielb1

@arielb1
Copy link
Contributor

arielb1 commented Oct 1, 2017

@bors rollup

@bors
Copy link
Collaborator

bors commented Oct 1, 2017

⌛ Testing commit 6f8b69f with merge f1b5225...

bors added a commit that referenced this pull request Oct 1, 2017
Mir pretty print: Add cleanup comment

I found it useful to add a comment indicating whether or not a
BasicBlock is a cleanup block or not. Hopefully you'll find it
useful too.
@bors
Copy link
Collaborator

bors commented Oct 1, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: arielb1
Pushing f1b5225 to master...

@bors bors merged commit 6f8b69f into rust-lang:master Oct 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants