about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorHugues de Valon <hugues.devalon@arm.com>2020-09-29 12:20:56 +0100
committerHugues de Valon <hugues.devalon@arm.com>2020-09-30 14:57:37 +0100
commitd255d70e7a6a84c82cc74f968f529f42dd40b8ce (patch)
tree569f7b62c17341ceb75201f5c3145f5bd065c931 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent511ed9f2356af365ad8affe046b3dd33f7ac3c98 (diff)
downloadrust-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_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index e85a9b76380..9f8ea7f43d8 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1171,6 +1171,7 @@ enum class LLVMRustDiagnosticKind {
   OptimizationFailure,
   PGOProfile,
   Linker,
+  Unsupported,
 };
 
 static LLVMRustDiagnosticKind toRust(DiagnosticKind Kind) {
@@ -1197,6 +1198,8 @@ static LLVMRustDiagnosticKind toRust(DiagnosticKind Kind) {
     return LLVMRustDiagnosticKind::PGOProfile;
   case DK_Linker:
     return LLVMRustDiagnosticKind::Linker;
+  case DK_Unsupported:
+    return LLVMRustDiagnosticKind::Unsupported;
   default:
     return (Kind >= DK_FirstRemark && Kind <= DK_LastRemark)
                ? LLVMRustDiagnosticKind::OptimizationRemarkOther