diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2016-01-15 17:34:38 +0100 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2016-01-15 18:29:29 +0100 |
| commit | f10af2e5fa505a217f7b22591b29953e9c75d835 (patch) | |
| tree | 116fe8906c676f8fdf0d5edb6618d91df27d1ed2 /src/rustllvm/RustWrapper.cpp | |
| parent | a70a60a02bca4c1fb75a0eb0ecf80acb73972f66 (diff) | |
| download | rust-f10af2e5fa505a217f7b22591b29953e9c75d835.tar.gz rust-f10af2e5fa505a217f7b22591b29953e9c75d835.zip | |
Translate zero-sized return types as void
The only way to get a value for a zero-sized type is `undef`, so there's really no point in actually having a return type other than void for such types. Also, while the comment in return_type_is_void mentioned something about aiding C ABI support, @eddyb correctly pointed out on IRC that there is no such thing as a zero-sized type in C. And even with clang, which allows empty structs, those get translated as void return types as well. Fixes #28766
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
