Skip to content

Commit 18d92a9

Browse files
committed
---
yaml --- r: 273649 b: refs/heads/beta c: 95697a8 h: refs/heads/master i: 273647: eb16f39
1 parent 4db2e71 commit 18d92a9

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
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 8f34053f762f708430971a36fc4c6e665528ebe2
26+
refs/heads/beta: 95697a83955c03d42eaaac6ecedcae04bd6986c9
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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/beta/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/beta/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/beta/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/beta/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/beta/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/beta/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)