diff options
| author | Hugues de Valon <hugues.devalon@arm.com> | 2020-09-29 12:20:56 +0100 |
|---|---|---|
| committer | Hugues de Valon <hugues.devalon@arm.com> | 2020-09-30 14:57:37 +0100 |
| commit | d255d70e7a6a84c82cc74f968f529f42dd40b8ce (patch) | |
| tree | 569f7b62c17341ceb75201f5c3145f5bd065c931 /compiler/rustc_codegen_llvm/src/back | |
| parent | 511ed9f2356af365ad8affe046b3dd33f7ac3c98 (diff) | |
| download | rust-d255d70e7a6a84c82cc74f968f529f42dd40b8ce.tar.gz rust-d255d70e7a6a84c82cc74f968f529f42dd40b8ce.zip | |
Update LLVM and add Unsupported diagnostic
Secure entry functions do not support if arguments are passed on the stack. An "unsupported" diagnostic will be emitted by LLVM if that is the case. This commits adds support in Rust for that diagnostic so that an error will be output if that is the case! Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index 937821e9d4f..f35c1016f86 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -344,6 +344,13 @@ unsafe extern "C" fn diagnostic_handler(info: &DiagnosticInfo, user: *mut c_void .expect("non-UTF8 diagnostic"); diag_handler.warn(&msg); } + llvm::diagnostic::Unsupported(diagnostic_ref) => { + let msg = llvm::build_string(|s| { + llvm::LLVMRustWriteDiagnosticInfoToString(diagnostic_ref, s) + }) + .expect("non-UTF8 diagnostic"); + diag_handler.err(&msg); + } llvm::diagnostic::UnknownDiagnostic(..) => {} } } |
