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/DIBuilder.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/DIBuilder.cpp')
-rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index 1ce8c17..58a7e07 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -405,12 +405,11 @@ DIDerivedType * DIBuilder::createStaticMemberType(DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber, DIType *Ty, DINode::DIFlags Flags, llvm::Constant *Val, - uint32_t AlignInBits) { + unsigned Tag, uint32_t AlignInBits) { Flags |= DINode::FlagStaticMember; - return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File, - LineNumber, getNonCompileUnitScope(Scope), Ty, 0, - AlignInBits, 0, std::nullopt, Flags, - getConstantOrNull(Val)); + return DIDerivedType::get(VMContext, Tag, Name, File, LineNumber, + getNonCompileUnitScope(Scope), Ty, 0, AlignInBits, + 0, std::nullopt, Flags, getConstantOrNull(Val)); } DIDerivedType * |