about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2024-02-21 12:18:59 +0300
committerklensy <klensy@users.noreply.github.com>2024-02-21 12:18:59 +0300
commit205cfcba200b13af31c39e67127cb3c07d491702 (patch)
tree489e9661b81e49c57a787baafabbbbc5f23afd49 /compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs
parentbea5bebf3defc56e5e3446b4a95c685dbb885fd3 (diff)
downloadrust-205cfcba200b13af31c39e67127cb3c07d491702.tar.gz
rust-205cfcba200b13af31c39e67127cb3c07d491702.zip
llvm-wrapper: fix warning C4244
llvm-wrapper/RustWrapper.cpp(1234): warning C4244: '=': conversion from 'uint64_t' to 'unsigned int', possible loss of data
nice consistency:

uint64_t https://github.com/llvm/llvm-project/blob/6009708b4367171ccdbf4b5905cb6a803753fe18/llvm/include/llvm/IR/DiagnosticInfo.h#L172
but unsigned https://github.com/llvm/llvm-project/blob/6009708b4367171ccdbf4b5905cb6a803753fe18/llvm/include/llvm/IR/DiagnosticInfo.h#L1091
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs b/compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs
index 06e846a2b45..f9b28178ddb 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/diagnostic.rs
@@ -123,7 +123,7 @@ impl SrcMgrDiagnostic {
 #[derive(Clone)]
 pub struct InlineAsmDiagnostic {
     pub level: super::DiagnosticLevel,
-    pub cookie: c_uint,
+    pub cookie: u64,
     pub message: String,
     pub source: Option<(String, Vec<InnerSpan>)>,
 }
@@ -149,7 +149,7 @@ impl InlineAsmDiagnostic {
         let smdiag = SrcMgrDiagnostic::unpack(super::LLVMRustGetSMDiagnostic(di, &mut cookie));
         InlineAsmDiagnostic {
             level: smdiag.level,
-            cookie,
+            cookie: cookie.into(),
             message: smdiag.message,
             source: smdiag.source,
         }