Skip to content

Commit c614752

Browse files
committed
---
yaml --- r: 276568 b: refs/heads/try c: 95697a8 h: refs/heads/master
1 parent c7857ba commit c614752

File tree

12 files changed

+169
-95
lines changed

12 files changed

+169
-95
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: 8f34053f762f708430971a36fc4c6e665528ebe2
4+
refs/heads/try: 95697a83955c03d42eaaac6ecedcae04bd6986c9
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,11 @@ then
969969
LLVM_VERSION=$($LLVM_CONFIG --version)
970970

971971
case $LLVM_VERSION in
972-
(3.[6-8]*)
972+
(3.[5-8]*)
973973
msg "found ok version of LLVM: $LLVM_VERSION"
974974
;;
975975
(*)
976-
err "bad LLVM version: $LLVM_VERSION, need >=3.6"
976+
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
977977
;;
978978
esac
979979
fi

branches/try/src/bootstrap/mk/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ standalone-docs:
3838
$(Q)$(BOOTSTRAP) --step doc-standalone
3939
check:
4040
$(Q)$(BOOTSTRAP) --step check
41-
check-cargotest:
42-
$(Q)$(BOOTSTRAP) --step check-cargotest
41+
cargotest:
42+
$(Q)$(BOOTSTRAP) --step cargotest
4343
dist:
4444
$(Q)$(BOOTSTRAP) --step dist
4545

branches/try/src/doc/book/strings.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ let s = "foo\
4444
assert_eq!("foobar", s);
4545
```
4646

47-
Note that you normally cannot access a `str` directly, but only through a `&str`
48-
reference. This is because `str` is an unsized type which requires additional
49-
runtime information to be usable. For more information see the chapter on
50-
[unsized types][ut].
51-
5247
Rust has more than only `&str`s though. A `String` is a heap-allocated string.
5348
This string is growable, and is also guaranteed to be UTF-8. `String`s are
5449
commonly created by converting from a string slice using the `to_string`
@@ -190,6 +185,5 @@ let hello_world = hello + &world;
190185
This is because `&String` can automatically coerce to a `&str`. This is a
191186
feature called ‘[`Deref` coercions][dc]’.
192187

193-
[ut]: unsized-types.html
194188
[dc]: deref-coercions.html
195189
[connect]: ../std/net/struct.TcpStream.html#method.connect

branches/try/src/doc/reference.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3911,9 +3911,6 @@ The _heap_ is a general term that describes boxes. The lifetime of an
39113911
allocation in the heap depends on the lifetime of the box values pointing to
39123912
it. Since box values may themselves be passed in and out of frames, or stored
39133913
in the heap, heap allocations may outlive the frame they are allocated within.
3914-
An allocation in the heap is guaranteed to reside at a single location in the
3915-
heap for the whole lifetime of the allocation - it will never be relocated as
3916-
a result of moving a box value.
39173914

39183915
### Memory ownership
39193916

branches/try/src/etc/CONFIGS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ These are some links to repos with configs which ease the use of rust.
1010
* [kate-config](https://github.com/rust-lang/kate-config)
1111
* [nano-config](https://github.com/rust-lang/nano-config)
1212
* [zsh-config](https://github.com/rust-lang/zsh-config)
13+
14+
## Community-maintained Configs
15+
16+
* [.editorconfig](https://gist.github.com/derhuerst/c9d1b9309e308d9851fa) ([what is this?](http://editorconfig.org/))

branches/try/src/librustc_llvm/lib.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,9 +964,10 @@ extern {
964964
pub fn LLVMAddFunctionAttrStringValue(Fn: ValueRef, index: c_uint,
965965
Name: *const c_char,
966966
Value: *const c_char);
967+
pub fn LLVMRemoveFunctionAttributes(Fn: ValueRef, index: c_uint, attr: uint64_t);
967968
pub fn LLVMRemoveFunctionAttrString(Fn: ValueRef, index: c_uint, Name: *const c_char);
968-
pub fn LLVMGetFunctionAttr(Fn: ValueRef) -> c_ulonglong;
969-
pub fn LLVMRemoveFunctionAttr(Fn: ValueRef, val: c_ulonglong);
969+
pub fn LLVMGetFunctionAttr(Fn: ValueRef) -> c_uint;
970+
pub fn LLVMRemoveFunctionAttr(Fn: ValueRef, val: c_uint);
970971

971972
/* Operations on parameters */
972973
pub fn LLVMCountParams(Fn: ValueRef) -> c_uint;
@@ -2184,6 +2185,13 @@ pub fn SetFunctionAttribute(fn_: ValueRef, attr: Attribute) {
21842185
}
21852186
}
21862187

2188+
pub fn RemoveFunctionAttributes(fn_: ValueRef, attr: Attribute) {
2189+
unsafe {
2190+
LLVMRemoveFunctionAttributes(fn_, FunctionIndex as c_uint,
2191+
attr.bits() as uint64_t)
2192+
}
2193+
}
2194+
21872195
/* Memory-managed interface to target data. */
21882196

21892197
pub struct TargetData {

branches/try/src/librustc_trans/trans/attributes.rs

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// except according to those terms.
1010
//! Set and unset common attributes on LLVM values.
1111
12-
use libc::{c_uint, c_ulonglong};
12+
use libc::c_uint;
1313
use llvm::{self, ValueRef};
1414
use session::config::NoDebugInfo;
1515
pub use syntax::attr::InlineAttr;
@@ -28,9 +28,7 @@ pub fn inline(val: ValueRef, inline: InlineAttr) {
2828
let attr = llvm::Attribute::InlineHint |
2929
llvm::Attribute::AlwaysInline |
3030
llvm::Attribute::NoInline;
31-
unsafe {
32-
llvm::LLVMRemoveFunctionAttr(val, attr.bits() as c_ulonglong)
33-
}
31+
llvm::RemoveFunctionAttributes(val, attr)
3432
},
3533
};
3634
}
@@ -41,25 +39,15 @@ pub fn emit_uwtable(val: ValueRef, emit: bool) {
4139
if emit {
4240
llvm::SetFunctionAttribute(val, llvm::Attribute::UWTable);
4341
} else {
44-
unsafe {
45-
llvm::LLVMRemoveFunctionAttr(
46-
val,
47-
llvm::Attribute::UWTable.bits() as c_ulonglong,
48-
);
49-
}
42+
llvm::RemoveFunctionAttributes(val, llvm::Attribute::UWTable);
5043
}
5144
}
5245

5346
/// Tell LLVM whether the function can or cannot unwind.
5447
#[inline]
5548
pub fn unwind(val: ValueRef, can_unwind: bool) {
5649
if can_unwind {
57-
unsafe {
58-
llvm::LLVMRemoveFunctionAttr(
59-
val,
60-
llvm::Attribute::NoUnwind.bits() as c_ulonglong,
61-
);
62-
}
50+
llvm::RemoveFunctionAttributes(val, llvm::Attribute::NoUnwind);
6351
} else {
6452
llvm::SetFunctionAttribute(val, llvm::Attribute::NoUnwind);
6553
}
@@ -72,12 +60,7 @@ pub fn set_optimize_for_size(val: ValueRef, optimize: bool) {
7260
if optimize {
7361
llvm::SetFunctionAttribute(val, llvm::Attribute::OptimizeForSize);
7462
} else {
75-
unsafe {
76-
llvm::LLVMRemoveFunctionAttr(
77-
val,
78-
llvm::Attribute::OptimizeForSize.bits() as c_ulonglong,
79-
);
80-
}
63+
llvm::RemoveFunctionAttributes(val, llvm::Attribute::OptimizeForSize);
8164
}
8265
}
8366

@@ -87,9 +70,7 @@ pub fn naked(val: ValueRef, is_naked: bool) {
8770
if is_naked {
8871
llvm::SetFunctionAttribute(val, llvm::Attribute::Naked);
8972
} else {
90-
unsafe {
91-
llvm::LLVMRemoveFunctionAttr(val, llvm::Attribute::Naked.bits() as c_ulonglong);
92-
}
73+
llvm::RemoveFunctionAttributes(val, llvm::Attribute::Naked);
9374
}
9475
}
9576

0 commit comments

Comments
 (0)