File tree 3 files changed +37
-2
lines changed
librustc_codegen_llvm/llvm
3 files changed +37
-2
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ impl OptimizationDiagnostic<'ll> {
98
98
pub struct InlineAsmDiagnostic < ' ll > {
99
99
pub cookie : c_uint ,
100
100
pub message : & ' ll Twine ,
101
- pub instruction : & ' ll Value ,
101
+ pub instruction : Option < & ' ll Value > ,
102
102
}
103
103
104
104
impl InlineAsmDiagnostic < ' ll > {
@@ -117,7 +117,7 @@ impl InlineAsmDiagnostic<'ll> {
117
117
InlineAsmDiagnostic {
118
118
cookie,
119
119
message : message. unwrap ( ) ,
120
- instruction : instruction . unwrap ( ) ,
120
+ instruction,
121
121
}
122
122
}
123
123
}
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 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
+ #![ feature( asm) ]
12
+
13
+ fn main ( ) {
14
+ unsafe {
15
+ asm ! ( "int $3" ) ; //~ ERROR too few operands for instruction
16
+ //~| ERROR invalid operand in inline asm
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ error: invalid operand in inline asm: 'int $3'
2
+ --> $DIR/issue-23458.rs:15:9
3
+ |
4
+ LL | asm!("int $3"); //~ ERROR too few operands for instruction
5
+ | ^^^^^^^^^^^^^^^
6
+
7
+ error: <inline asm>:1:2: error: too few operands for instruction
8
+ int
9
+ ^
10
+
11
+ --> $DIR/issue-23458.rs:15:9
12
+ |
13
+ LL | asm!("int $3"); //~ ERROR too few operands for instruction
14
+ | ^^^^^^^^^^^^^^^
15
+
16
+ error: aborting due to 2 previous errors
17
+
You can’t perform that action at this time.
0 commit comments