diff options
author | bors <bors@rust-lang.org> | 2022-11-21 01:44:12 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2022-11-21 01:44:12 +0000 |
commit | ccde51a912e89478a649dc9e64b5584a5971f75f (patch) | |
tree | b67b50d46582a17f8bc14bdcfb9111b4b0be4112 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
parent | a102dc806da3bc9c59b3594368a14e7d2632bf9c (diff) | |
parent | 6f6eebde2012dcb163726c66f64fce4b5172dd9f (diff) | |
download | rust-ccde51a912e89478a649dc9e64b5584a5971f75f.tar.gz |
Auto merge of #102717 - beetrees:repr128-c-style-debuginfo, r=nagisa
Pass 128-bit C-style enum enumerator values to LLVM
Pass the full 128 bits of C-style enum enumerators through to LLVM. This means that debuginfo for C-style repr128 enums is now emitted correctly for DWARF platforms (as compared to not being correctly emitted on any platform).
Tracking issue: #56071
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 6f8bb676104..216c35d6da0 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1036,8 +1036,9 @@ extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareAtEnd( extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerator( LLVMRustDIBuilderRef Builder, const char *Name, size_t NameLen, - int64_t Value, bool IsUnsigned) { - return wrap(Builder->createEnumerator(StringRef(Name, NameLen), Value, IsUnsigned)); + const uint64_t Value[2], unsigned SizeInBits, bool IsUnsigned) { + return wrap(Builder->createEnumerator(StringRef(Name, NameLen), + APSInt(APInt(SizeInBits, makeArrayRef(Value, 2)), IsUnsigned))); } extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateEnumerationType( |