From 984898da1727158f096c3a07ebd9a5ac487d733f Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 15 Nov 2023 11:29:35 -0800 Subject: [PATCH 1/2] [llvm-wrapper] Pass newly added param to DIBuilder::createStaticMemberType() This was added in https://github.com/llvm/llvm-project/pull/72234. DW_TAG_member was the implicit default before. --- compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 4390486b0de..8b2c73aeffa 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -983,6 +983,9 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticMemberType( unwrapDI(Ty), fromRust(Flags), unwrap(val), +#if LLVM_VERSION_GE(17, 0) + llvm::dwarf::DW_TAG_member, +#endif AlignInBits )); } From e2c3e94be9c794d7b9e767a3be34ad863322387b Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Wed, 15 Nov 2023 13:15:55 -0800 Subject: [PATCH 2/2] 17 -> 18 --- compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 8b2c73aeffa..a0a176d31eb 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -983,7 +983,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticMemberType( unwrapDI(Ty), fromRust(Flags), unwrap(val), -#if LLVM_VERSION_GE(17, 0) +#if LLVM_VERSION_GE(18, 0) llvm::dwarf::DW_TAG_member, #endif AlignInBits