File tree Expand file tree Collapse file tree 3 files changed +15
-27
lines changed Expand file tree Collapse file tree 3 files changed +15
-27
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 510d0f221c5a9ca7671149fe7e7bb802592edc06
4
+ refs/heads/snap-stage3: 2c2346e3d4f999b95a56444d978c3ea792828263
5
5
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
Original file line number Diff line number Diff line change @@ -1694,7 +1694,20 @@ pub fn create_llargs_for_fn_args(cx: fn_ctxt,
1694
1694
vec:: from_fn ( args. len ( ) , |i| {
1695
1695
unsafe {
1696
1696
let arg_n = first_real_arg + i;
1697
- llvm:: LLVMGetParam ( cx. llfn , arg_n as c_uint )
1697
+ let arg = & args[ i] ;
1698
+ let llarg = llvm:: LLVMGetParam ( cx. llfn , arg_n as c_uint ) ;
1699
+
1700
+ // Mark `&mut T` as no-alias, as the borrowck pass ensures it's true
1701
+ match arg. ty . node {
1702
+ ast:: ty_rptr( _, mt) => {
1703
+ if mt. mutbl == ast:: m_mutbl {
1704
+ llvm:: LLVMAddAttribute ( llarg, lib:: llvm:: NoAliasAttribute as c_uint ) ;
1705
+ }
1706
+ }
1707
+ _ => { }
1708
+ }
1709
+
1710
+ llarg
1698
1711
}
1699
1712
} )
1700
1713
}
Original file line number Diff line number Diff line change @@ -675,11 +675,6 @@ pub fn mkdir_recursive(p: &Path, mode: c_int) -> bool {
675
675
/// Lists the contents of a directory
676
676
#[ allow( non_implicitly_copyable_typarams) ]
677
677
pub fn list_dir ( p : & Path ) -> ~[ ~str ] {
678
- if p. components . is_empty ( ) && !p. is_absolute ( ) {
679
- // Not sure what the right behavior is here, but this
680
- // prevents a bounds check failure later
681
- return ~[ ] ;
682
- }
683
678
unsafe {
684
679
#[ cfg( target_os = "linux" ) ]
685
680
#[ cfg( target_os = "android" ) ]
@@ -1601,26 +1596,6 @@ mod tests {
1601
1596
}
1602
1597
}
1603
1598
1604
- #[test]
1605
- fn list_dir_empty_path() {
1606
- let dirs = os::list_dir(&Path(" "));
1607
- assert!(dirs.is_empty());
1608
- }
1609
-
1610
- #[test]
1611
- #[cfg(not(windows))]
1612
- fn list_dir_root() {
1613
- let dirs = os::list_dir(&Path(" /"));
1614
- assert!(dirs.len() > 1);
1615
- }
1616
- #[test]
1617
- #[cfg(windows)]
1618
- fn list_dir_root() {
1619
- let dirs = os::list_dir(&Path(" C : \\ ") ) ;
1620
- assert ! ( dirs. len( ) > 1 ) ;
1621
- }
1622
-
1623
-
1624
1599
#[test]
1625
1600
fn path_is_dir() {
1626
1601
assert!((os::path_is_dir(&Path(" . "))));
You can’t perform that action at this time.
0 commit comments