We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43751e4 commit 1c46ee3Copy full SHA for 1c46ee3
src/rustc/middle/trans/shape.rs
@@ -637,6 +637,12 @@ fn llalign_of_pref(cx: @crate_ctxt, t: TypeRef) -> uint {
637
ret llvm::LLVMPreferredAlignmentOfType(cx.td.lltd, t) as uint;
638
}
639
640
+// Returns the minimum alignment of a type required by the plattform.
641
+// This is the alignment that will be used for struct fields.
642
+fn llalign_of_min(cx: @crate_ctxt, t: TypeRef) -> uint {
643
+ ret llvm::LLVMABIAlignmentOfType(cx.td.lltd, t) as uint;
644
+}
645
+
646
fn llsize_of(cx: @crate_ctxt, t: TypeRef) -> ValueRef {
647
ret llvm::LLVMConstIntCast(lib::llvm::llvm::LLVMSizeOf(t), cx.int_type,
648
False);
0 commit comments