diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2023-11-15 09:36:47 +0000 |
---|---|---|
committer | Michael Buch <michaelbuch12@gmail.com> | 2023-11-15 10:26:35 +0000 |
commit | da90fd75241d5b149fd307e3eeae84f7317d9d9b (patch) | |
tree | 43ccb676f24659ac014887478c7bdfbcac356a4c /llvm/lib/IR/DebugInfo.cpp | |
parent | 808caa9d4608b4383743043f6dbdab6faf608bcc (diff) | |
download | llvm-da90fd75241d5b149fd307e3eeae84f7317d9d9b.zip llvm-da90fd75241d5b149fd307e3eeae84f7317d9d9b.tar.gz llvm-da90fd75241d5b149fd307e3eeae84f7317d9d9b.tar.bz2 |
Reland "[llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (#72234)"
This was reverted because it broke the OCaml LLVM bindings.
Relanding the original patch but without changing the C-API.
They'll continue to work just fine as they do today. If in the
future there is a need to pass a new tag to the C-API for creating
static members, then we'll make the change to the OCaml bindings
at that time.
Original commit message:
"""
This patch adds the LLVM-side infrastructure to implement DWARFv5 issue
161118.1: "DW_TAG for C++ static data members".
The clang-side of this patch will simply construct the DIDerivedType
with a different DW_TAG.
"""
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 390a27c..bb6d6126 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -1315,17 +1315,15 @@ LLVMDIBuilderCreateUnspecifiedType(LLVMDIBuilderRef Builder, const char *Name, return wrap(unwrap(Builder)->createUnspecifiedType({Name, NameLen})); } -LLVMMetadataRef -LLVMDIBuilderCreateStaticMemberType( +LLVMMetadataRef LLVMDIBuilderCreateStaticMemberType( LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name, size_t NameLen, LLVMMetadataRef File, unsigned LineNumber, LLVMMetadataRef Type, LLVMDIFlags Flags, LLVMValueRef ConstantVal, uint32_t AlignInBits) { return wrap(unwrap(Builder)->createStaticMemberType( - unwrapDI<DIScope>(Scope), {Name, NameLen}, - unwrapDI<DIFile>(File), LineNumber, unwrapDI<DIType>(Type), - map_from_llvmDIFlags(Flags), unwrap<Constant>(ConstantVal), - AlignInBits)); + unwrapDI<DIScope>(Scope), {Name, NameLen}, unwrapDI<DIFile>(File), + LineNumber, unwrapDI<DIType>(Type), map_from_llvmDIFlags(Flags), + unwrap<Constant>(ConstantVal), DW_TAG_member, AlignInBits)); } LLVMMetadataRef |