Skip to content

Commit 215ebc3

Browse files
committed
Auto merge of #83030 - nikic:update-llvm, r=nagisa
Update llvm-project submodule Fixes #82833. Fixes #82859. Probably also `fixes` #83025. This also merges in the current upstream 12.x branch. r? `@nagisa`
2 parents 338647d + ef269ac commit 215ebc3

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

src/llvm-project

Submodule llvm-project updated 39 files
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// run-pass
2+
// compile-flags: -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Copt-level=0 -Cdebuginfo=2
3+
// ignore-tidy-linelength
4+
5+
// Make sure LLVM does not miscompile this.
6+
7+
fn make_string(ch: char) -> String {
8+
let mut bytes = [0u8; 4];
9+
ch.encode_utf8(&mut bytes).into()
10+
}
11+
12+
fn main() {
13+
let ch = '😃';
14+
dbg!(ch);
15+
let string = make_string(ch);
16+
dbg!(string);
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// run-pass
2+
// compile-flags: -Copt-level=0 -Cdebuginfo=2
3+
4+
// Make sure LLVM does not miscompile this.
5+
6+
fn indirect_get_slice() -> &'static [usize] {
7+
&[]
8+
}
9+
10+
#[inline(always)]
11+
fn get_slice() -> &'static [usize] {
12+
let ret = indirect_get_slice();
13+
ret
14+
}
15+
16+
fn main() {
17+
let output = get_slice().len();
18+
assert_eq!(output, 0);
19+
}

0 commit comments

Comments
 (0)