Skip to content

Commit febfb75

Browse files
author
Jakub Wieczorek
committed
Update LLVM to address an issue with range metadata in hoisted loads
Fixes rust-lang#15793.
1 parent df68c6f commit febfb75

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

src/rustllvm/llvm-auto-clean-trigger

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2014-07-20
4+
2014-07-21

src/test/run-pass/issue-15793.rs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
enum NestedEnum {
12+
First,
13+
Second,
14+
Third
15+
}
16+
enum Enum {
17+
Variant1(bool),
18+
Variant2(NestedEnum)
19+
}
20+
21+
#[inline(never)]
22+
fn foo(x: Enum) -> int {
23+
match x {
24+
Variant1(true) => 1,
25+
Variant1(false) => 2,
26+
Variant2(Second) => 3,
27+
Variant2(Third) => 4,
28+
Variant2(First) => 5
29+
}
30+
}
31+
32+
fn main() {
33+
assert_eq!(foo(Variant2(Third)), 4);
34+
}

0 commit comments

Comments
 (0)