diff options
author | Michael Buch <michaelbuch12@gmail.com> | 2023-11-15 08:16:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-15 08:16:24 +0000 |
commit | 9a9933fae23249fbf6cf5b3c090e630f578b7f98 (patch) | |
tree | 2e60f0886d0e3884f74c780758b86fc1d8a807bc /llvm/lib/IR/DebugInfo.cpp | |
parent | 5480be13d5bff9df8d306cd948ff975ed577c054 (diff) | |
download | llvm-9a9933fae23249fbf6cf5b3c090e630f578b7f98.zip llvm-9a9933fae23249fbf6cf5b3c090e630f578b7f98.tar.gz llvm-9a9933fae23249fbf6cf5b3c090e630f578b7f98.tar.bz2 |
[llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (#72234)
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 | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index 390a27c..0f3590e 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) { + unsigned Tag, 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), Tag, AlignInBits)); } LLVMMetadataRef |