Skip to content

Commit bf3a744

Browse files
committed
Add tests
1 parent 261c7c1 commit bf3a744

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/test/codegen/repr-u128.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// compile-flags: --emit=llvm-ir -C debuginfo=2
2+
#![feature(repr128)]
3+
4+
#[repr(u128)]
5+
pub enum Foo {
6+
Lo,
7+
Hi = 1 << 64,
8+
}
9+
10+
pub fn foo() -> Option<Foo> {
11+
None
12+
}
13+
14+
// CHECK: declare void @llvm.dbg.value
15+
fn main() {
16+
let vals = (Some(Foo::Lo), None::<Foo>);
17+
}

src/test/debuginfo/repr-u128.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// compile-flags: --emit=llvm-ir -C debuginfo=2
2+
#![feature(repr128)]
3+
4+
#[repr(u128)]
5+
pub enum Foo {
6+
Lo,
7+
Hi = 1 << 64,
8+
}
9+
10+
pub fn foo() -> Option<Foo> {
11+
None
12+
}
13+
14+
// CHECK: declare void @llvm.dbg.value
15+
fn main() {
16+
let vals = (Some(Foo::Lo), None::<Foo>);
17+
}

0 commit comments

Comments
 (0)