File tree 3 files changed +29
-2
lines changed
librustc_codegen_llvm/llvm
3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ impl OptimizationDiagnostic<'ll> {
88
88
pub struct InlineAsmDiagnostic < ' ll > {
89
89
pub cookie : c_uint ,
90
90
pub message : & ' ll Twine ,
91
- pub instruction : & ' ll Value ,
91
+ pub instruction : Option < & ' ll Value > ,
92
92
}
93
93
94
94
impl InlineAsmDiagnostic < ' ll > {
@@ -107,7 +107,7 @@ impl InlineAsmDiagnostic<'ll> {
107
107
InlineAsmDiagnostic {
108
108
cookie,
109
109
message : message. unwrap ( ) ,
110
- instruction : instruction . unwrap ( ) ,
110
+ instruction,
111
111
}
112
112
}
113
113
}
Original file line number Diff line number Diff line change
1
+ #![ feature( asm) ]
2
+
3
+ // only-x86_64
4
+
5
+ fn main ( ) {
6
+ unsafe {
7
+ asm ! ( "int $3" ) ; //~ ERROR too few operands for instruction
8
+ //~| ERROR invalid operand in inline asm
9
+ }
10
+ }
Original file line number Diff line number Diff line change
1
+ error: invalid operand in inline asm: 'int $3'
2
+ --> $DIR/issue-23458.rs:7:9
3
+ |
4
+ LL | asm!("int $3");
5
+ | ^^^^^^^^^^^^^^^
6
+
7
+ error: <inline asm>:1:2: error: too few operands for instruction
8
+ int
9
+ ^
10
+
11
+ --> $DIR/issue-23458.rs:7:9
12
+ |
13
+ LL | asm!("int $3");
14
+ | ^^^^^^^^^^^^^^^
15
+
16
+ error: aborting due to 2 previous errors
17
+
You can’t perform that action at this time.
0 commit comments