about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorbeetrees <b@beetr.ee>2022-10-01 22:12:03 +0100
committerbeetrees <b@beetr.ee>2022-10-09 09:33:36 +0100
commit25c1c635e5b7df5b651f587b1427751bfe463339 (patch)
tree3036885bab7a439cbde8cb2b18582acaa54bcbde /compiler/rustc_llvm/llvm-wrapper
parent24ac6a26bcf5be1ac841e7fe969bd992b3461f9d (diff)
downloadrust-25c1c635e5b7df5b651f587b1427751bfe463339.tar.gz
rust-25c1c635e5b7df5b651f587b1427751bfe463339.zip
Pass 128-bit C-style enum enumerator values to LLVM
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp5
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 6f36281af23..f5adffd1f06 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -998,8 +998,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(