Skip to content
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

Rollup of 11 pull requests #39645

Merged
merged 25 commits into from
Feb 8, 2017
Merged
Changes from 3 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e866d07
lint/ctypes: Don't warn on non-unsized structs with PhantomData.
emilio Feb 2, 2017
b4e6f70
[llvm] Use 32-bits for alignment
Feb 4, 2017
c7bea76
Use u32 for alignments instead of u64
Feb 5, 2017
7c8c45e
Extract collections benchmarks to libcollections/benches
phungleson Feb 6, 2017
b975786
regr test
nikomatsakis Feb 6, 2017
fa0a728
back: Limit the number of LLVM worker threads.
michaelwoerister Feb 6, 2017
4f5fc4e
fix case where some edges can't be recreated by expanding the graph
nikomatsakis Feb 6, 2017
1ee88e5
A few documentation improvements for `syntax::print::pp`
bjorn3 Feb 5, 2017
b0803d4
Display correct filename with --test option
GuillaumeGomez Feb 6, 2017
2a345bb
make Child::try_wait return io::Result<Option<ExitStatus>>
oconnor663 Feb 3, 2017
37887fc
rustbuild: Clean build/dist on `make clean`
alexcrichton Feb 7, 2017
7916e00
Bump stable release date
brson Feb 7, 2017
e53eaa3
Rename manifest_version to manifest-version
alexcrichton Feb 7, 2017
d2f8abf
Add more test for rustdoc --test
GuillaumeGomez Feb 6, 2017
f69259e
Rollup merge of #39462 - emilio:improper-ctypes, r=nikomatsakis
frewsxcv Feb 8, 2017
96bf9ba
Rollup merge of #39512 - oconnor663:try_wait, r=alexcrichton
frewsxcv Feb 8, 2017
7709c4d
Rollup merge of #39529 - dylanmckay:llvm-4.0-align32, r=alexcrichton
frewsxcv Feb 8, 2017
75f97db
Rollup merge of #39557 - bjorn3:pp-docs, r=jseyfried
frewsxcv Feb 8, 2017
e0eeb6e
Rollup merge of #39561 - phungleson:libcollectionsbench, r=alexcrichton
frewsxcv Feb 8, 2017
944933e
Rollup merge of #39582 - nikomatsakis:incr-comp-issue-39569, r=michae…
frewsxcv Feb 8, 2017
7658921
Rollup merge of #39583 - michaelwoerister:limit-llvm-threads, r=nikom…
frewsxcv Feb 8, 2017
722baed
Rollup merge of #39597 - GuillaumeGomez:correct_rustdoc_test_file, r=…
frewsxcv Feb 8, 2017
e15bd31
Rollup merge of #39622 - alexcrichton:clean-dist, r=brson
frewsxcv Feb 8, 2017
83a581c
Rollup merge of #39624 - brson:relnotes-master, r=alexcrichton
frewsxcv Feb 8, 2017
62d2267
Rollup merge of #39630 - alexcrichton:update-manifest, r=brson
frewsxcv Feb 8, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/librustc_llvm/ffi.rs
Original file line number Diff line number Diff line change
@@ -1369,14 +1369,14 @@ extern "C" {
pub fn LLVMRustDIBuilderCreateBasicType(Builder: DIBuilderRef,
Name: *const c_char,
SizeInBits: u64,
AlignInBits: u64,
AlignInBits: u32,
Encoding: c_uint)
-> DIBasicType;

pub fn LLVMRustDIBuilderCreatePointerType(Builder: DIBuilderRef,
PointeeTy: DIType,
SizeInBits: u64,
AlignInBits: u64,
AlignInBits: u32,
Name: *const c_char)
-> DIDerivedType;

@@ -1386,7 +1386,7 @@ extern "C" {
File: DIFile,
LineNumber: c_uint,
SizeInBits: u64,
AlignInBits: u64,
AlignInBits: u32,
Flags: DIFlags,
DerivedFrom: DIType,
Elements: DIArray,
@@ -1401,7 +1401,7 @@ extern "C" {
File: DIFile,
LineNo: c_uint,
SizeInBits: u64,
AlignInBits: u64,
AlignInBits: u32,
OffsetInBits: u64,
Flags: DIFlags,
Ty: DIType)
@@ -1429,7 +1429,7 @@ extern "C" {
isLocalToUnit: bool,
Val: ValueRef,
Decl: DIDescriptor,
AlignInBits: u64)
AlignInBits: u32)
-> DIGlobalVariable;

pub fn LLVMRustDIBuilderCreateVariable(Builder: DIBuilderRef,
@@ -1442,19 +1442,19 @@ extern "C" {
AlwaysPreserve: bool,
Flags: DIFlags,
ArgNo: c_uint,
AlignInBits: u64)
AlignInBits: u32)
-> DIVariable;

pub fn LLVMRustDIBuilderCreateArrayType(Builder: DIBuilderRef,
Size: u64,
AlignInBits: u64,
AlignInBits: u32,
Ty: DIType,
Subscripts: DIArray)
-> DIType;

pub fn LLVMRustDIBuilderCreateVectorType(Builder: DIBuilderRef,
Size: u64,
AlignInBits: u64,
AlignInBits: u32,
Ty: DIType,
Subscripts: DIArray)
-> DIType;
@@ -1489,7 +1489,7 @@ extern "C" {
File: DIFile,
LineNumber: c_uint,
SizeInBits: u64,
AlignInBits: u64,
AlignInBits: u32,
Elements: DIArray,
ClassType: DIType)
-> DIType;
@@ -1500,7 +1500,7 @@ extern "C" {
File: DIFile,
LineNumber: c_uint,
SizeInBits: u64,
AlignInBits: u64,
AlignInBits: u32,
Flags: DIFlags,
Elements: DIArray,
RunTimeLang: c_uint,
2 changes: 1 addition & 1 deletion src/librustc_trans/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
@@ -1783,7 +1783,7 @@ pub fn create_global_var_metadata(cx: &CrateContext,
is_local_to_unit,
global,
ptr::null_mut(),
global_align as u64,
global_align,
);
}
}
2 changes: 1 addition & 1 deletion src/librustc_trans/debuginfo/mod.rs
Original file line number Diff line number Diff line change
@@ -464,7 +464,7 @@ pub fn declare_local<'a, 'tcx>(bcx: &Builder<'a, 'tcx>,
cx.sess().opts.optimize != config::OptLevel::No,
DIFlags::FlagZero,
argument_index,
align as u64,
align,
)
};
source_loc::set_debug_location(bcx,
11 changes: 7 additions & 4 deletions src/librustc_trans/debuginfo/utils.rs
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@ use type_::Type;
use syntax_pos::{self, Span};
use syntax::ast;

use std::ops;

pub fn is_node_local_to_unit(cx: &CrateContext, node_id: ast::NodeId) -> bool
{
// The is_local_to_unit flag indicates whether a function is local to the
@@ -49,12 +51,13 @@ pub fn span_start(cx: &CrateContext, span: Span) -> syntax_pos::Loc {
cx.sess().codemap().lookup_char_pos(span.lo)
}

pub fn size_and_align_of(cx: &CrateContext, llvm_type: Type) -> (u64, u64) {
(machine::llsize_of_alloc(cx, llvm_type), machine::llalign_of_min(cx, llvm_type) as u64)
pub fn size_and_align_of(cx: &CrateContext, llvm_type: Type) -> (u64, u32) {
(machine::llsize_of_alloc(cx, llvm_type), machine::llalign_of_min(cx, llvm_type))
}

pub fn bytes_to_bits(bytes: u64) -> u64 {
bytes * 8
pub fn bytes_to_bits<T>(bytes: T) -> T
where T: ops::Mul<Output=T> + From<u8> {
bytes * 8u8.into()
}

#[inline]
20 changes: 10 additions & 10 deletions src/rustllvm/RustWrapper.cpp
Original file line number Diff line number Diff line change
@@ -513,7 +513,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateFunction(

extern "C" LLVMRustMetadataRef
LLVMRustDIBuilderCreateBasicType(LLVMRustDIBuilderRef Builder, const char *Name,
uint64_t SizeInBits, uint64_t AlignInBits,
uint64_t SizeInBits, uint32_t AlignInBits,
unsigned Encoding) {
return wrap(Builder->createBasicType(Name, SizeInBits,
#if LLVM_VERSION_LE(3, 9)
@@ -524,15 +524,15 @@ LLVMRustDIBuilderCreateBasicType(LLVMRustDIBuilderRef Builder, const char *Name,

extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreatePointerType(
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef PointeeTy,
uint64_t SizeInBits, uint64_t AlignInBits, const char *Name) {
uint64_t SizeInBits, uint32_t AlignInBits, const char *Name) {
return wrap(Builder->createPointerType(unwrapDI<DIType>(PointeeTy),
SizeInBits, AlignInBits, Name));
}

extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStructType(
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Scope, const char *Name,
LLVMRustMetadataRef File, unsigned LineNumber, uint64_t SizeInBits,
uint64_t AlignInBits, LLVMRustDIFlags Flags,
uint32_t AlignInBits, LLVMRustDIFlags Flags,
LLVMRustMetadataRef DerivedFrom, LLVMRustMetadataRef Elements,
unsigned RunTimeLang, LLVMRustMetadataRef VTableHolder,
const char *UniqueId) {
@@ -546,7 +546,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStructType(
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateMemberType(
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Scope, const char *Name,
LLVMRustMetadataRef File, unsigned LineNo, uint64_t SizeInBits,
uint64_t AlignInBits, uint64_t OffsetInBits, LLVMRustDIFlags Flags,
uint32_t AlignInBits, uint64_t OffsetInBits, LLVMRustDIFlags Flags,
LLVMRustMetadataRef Ty) {
return wrap(Builder->createMemberType(unwrapDI<DIDescriptor>(Scope), Name,
unwrapDI<DIFile>(File), LineNo,
@@ -573,7 +573,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateStaticVariable(
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Context, const char *Name,
const char *LinkageName, LLVMRustMetadataRef File, unsigned LineNo,
LLVMRustMetadataRef Ty, bool IsLocalToUnit, LLVMValueRef V,
LLVMRustMetadataRef Decl = nullptr, uint64_t AlignInBits = 0) {
LLVMRustMetadataRef Decl = nullptr, uint32_t AlignInBits = 0) {
Constant *InitVal = cast<Constant>(unwrap(V));

#if LLVM_VERSION_GE(4, 0)
@@ -612,7 +612,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateVariable(
LLVMRustDIBuilderRef Builder, unsigned Tag, LLVMRustMetadataRef Scope,
const char *Name, LLVMRustMetadataRef File, unsigned LineNo,
LLVMRustMetadataRef Ty, bool AlwaysPreserve, LLVMRustDIFlags Flags,
unsigned ArgNo, uint64_t AlignInBits) {
unsigned ArgNo, uint32_t AlignInBits) {
#if LLVM_VERSION_GE(3, 8)
if (Tag == 0x100) { // DW_TAG_auto_variable
return wrap(Builder->createAutoVariable(
@@ -637,7 +637,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateVariable(

extern "C" LLVMRustMetadataRef
LLVMRustDIBuilderCreateArrayType(LLVMRustDIBuilderRef Builder, uint64_t Size,
uint64_t AlignInBits, LLVMRustMetadataRef Ty,
uint32_t AlignInBits, LLVMRustMetadataRef Ty,
LLVMRustMetadataRef Subscripts) {
return wrap(
Builder->createArrayType(Size, AlignInBits, unwrapDI<DIType>(Ty),
@@ -646,7 +646,7 @@ LLVMRustDIBuilderCreateArrayType(LLVMRustDIBuilderRef Builder, uint64_t Size,

extern "C" LLVMRustMetadataRef
LLVMRustDIBuilderCreateVectorType(LLVMRustDIBuilderRef Builder, uint64_t Size,
uint64_t AlignInBits, LLVMRustMetadataRef Ty,
uint32_t AlignInBits, LLVMRustMetadataRef Ty,
LLVMRustMetadataRef Subscripts) {
return wrap(
Builder->createVectorType(Size, AlignInBits, unwrapDI<DIType>(Ty),
@@ -687,7 +687,7 @@ LLVMRustDIBuilderCreateEnumerator(LLVMRustDIBuilderRef Builder,
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateEnumerationType(
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Scope, const char *Name,
LLVMRustMetadataRef File, unsigned LineNumber, uint64_t SizeInBits,
uint64_t AlignInBits, LLVMRustMetadataRef Elements,
uint32_t AlignInBits, LLVMRustMetadataRef Elements,
LLVMRustMetadataRef ClassTy) {
return wrap(Builder->createEnumerationType(
unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), LineNumber,
@@ -698,7 +698,7 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateEnumerationType(
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateUnionType(
LLVMRustDIBuilderRef Builder, LLVMRustMetadataRef Scope, const char *Name,
LLVMRustMetadataRef File, unsigned LineNumber, uint64_t SizeInBits,
uint64_t AlignInBits, LLVMRustDIFlags Flags, LLVMRustMetadataRef Elements,
uint32_t AlignInBits, LLVMRustDIFlags Flags, LLVMRustMetadataRef Elements,
unsigned RunTimeLang, const char *UniqueId) {
return wrap(Builder->createUnionType(
unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), LineNumber,