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
This commit is contained in:
bors 2022-11-21 01:44:12 +00:00
commit ccde51a912
6 changed files with 51 additions and 14 deletions

View file

@ -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(