Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debuginfo: Make DWARF representation of enums uniform.
So far the DWARF information for enums was different for regular enums, univariant enums, Option-like enums, etc. Regular enums were encoded as unions of structs, while the other variants were encoded as bare structs. With the changes in this PR all enums are encoded as unions so that debuggers can reconstruct if something originally was a struct, a univariant enum, or an Option-like enum. For the latter case, information about the Null variant is encoded into the union field name. This information can then be used by the debugger to print a None value actually as None instead of Some(0x0).
- Loading branch information
1 parent
1380893
commit eea329b
Showing
11 changed files
with
223 additions
and
147 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eea329b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from luqmana
at michaelwoerister@eea329b
eea329b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging michaelwoerister/rust/unified_enum_rep = eea329b into auto
eea329b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
michaelwoerister/rust/unified_enum_rep = eea329b merged ok, testing candidate = 0935beb
eea329b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/5993
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/5991
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/5087
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/5095
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/6091
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/5179
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/5187
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/6093
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/5178
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/5184
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/5244
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/2980
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/6083
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/5179
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/5194
eea329b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = 0935beb