diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2022-06-20 17:50:27 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2022-08-12 10:53:07 +0200 |
| commit | 622da5d834e862112e860db1fc0404bd8604f578 (patch) | |
| tree | 20807735359dc09b37b710845a8b9ed7d9bbd04e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | e2b52ff73edc8b0b7c74bc28760d618187731fe8 (diff) | |
| download | rust-622da5d834e862112e860db1fc0404bd8604f578.tar.gz rust-622da5d834e862112e860db1fc0404bd8604f578.zip | |
debuginfo: Change C++-like encoding for enums.
The updated encoding should be able to handle niche layouts where more than one variant has fields.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 5f5b5de790e..f9bffe6d823 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -924,6 +924,30 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateVariantMemberType( fromRust(Flags), unwrapDI<DIType>(Ty))); } +extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticMemberType( + LLVMRustDIBuilderRef Builder, + LLVMMetadataRef Scope, + const char *Name, + size_t NameLen, + LLVMMetadataRef File, + unsigned LineNo, + LLVMMetadataRef Ty, + LLVMRustDIFlags Flags, + LLVMValueRef val, + uint32_t AlignInBits +) { + return wrap(Builder->createStaticMemberType( + unwrapDI<DIDescriptor>(Scope), + StringRef(Name, NameLen), + unwrapDI<DIFile>(File), + LineNo, + unwrapDI<DIType>(Ty), + fromRust(Flags), + unwrap<llvm::ConstantInt>(val), + AlignInBits + )); +} + extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateLexicalBlock( LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line, unsigned Col) { |
