diff options
| author | Hyeon Kim <simnalamburt@gmail.com> | 2015-01-06 11:18:32 +0900 |
|---|---|---|
| committer | Hyeon Kim <simnalamburt@gmail.com> | 2015-01-07 12:43:12 +0900 |
| commit | 1bc3c960f4a803007ceb74b9085d15c61a88de11 (patch) | |
| tree | 30eb3e518c4f4de4bc58dd1b19a0dfa1f23cb6f9 | |
| parent | ea6f65c5f1a3f84e010d2cef02a0160804e9567a (diff) | |
| download | rust-1bc3c960f4a803007ceb74b9085d15c61a88de11.tar.gz rust-1bc3c960f4a803007ceb74b9085d15c61a88de11.zip | |
Correct the comment of the function `llsize_of_real`
Consult the issue #20460
| -rw-r--r-- | src/librustc_trans/trans/machine.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/librustc_trans/trans/machine.rs b/src/librustc_trans/trans/machine.rs index 41738f1e58f..95d67cd54c1 100644 --- a/src/librustc_trans/trans/machine.rs +++ b/src/librustc_trans/trans/machine.rs @@ -43,8 +43,10 @@ pub fn llsize_of_alloc(cx: &CrateContext, ty: Type) -> llsize { // Returns, as near as we can figure, the "real" size of a type. As in, the // bits in this number of bytes actually carry data related to the datum -// with the type. Not junk, padding, accidentally-damaged words, or -// whatever. Rounds up to the nearest byte though, so if you have a 1-bit +// with the type. Not junk, accidentally-damaged words, or whatever. +// Note that padding of the type will be included for structs, but not for the +// other types (i.e. SIMD types). +// Rounds up to the nearest byte though, so if you have a 1-bit // value, we return 1 here, not 0. Most of rustc works in bytes. Be warned // that LLVM *does* distinguish between e.g. a 1-bit value and an 8-bit value // at the codegen level! In general you should prefer `llbitsize_of_real` |
