diff options
author | deadalnix <deadalnix@gmail.com> | 2024-08-13 12:12:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-13 12:12:29 +0200 |
commit | 3fa946a8442e1b8d4fdbdc9b9b7e8c12a0f77dcc (patch) | |
tree | e6c1be3db406a2392bb46484c083efd8f1cb6e5e /llvm/lib/IR/DIBuilder.cpp | |
parent | a9636b7f60f283926c66e96c036f5b5d9e57c026 (diff) | |
download | llvm-3fa946a8442e1b8d4fdbdc9b9b7e8c12a0f77dcc.zip llvm-3fa946a8442e1b8d4fdbdc9b9b7e8c12a0f77dcc.tar.gz llvm-3fa946a8442e1b8d4fdbdc9b9b7e8c12a0f77dcc.tar.bz2 |
[DI] Have createClassType create a class type. (#102624)
I was wondering why my use of createClassType was generating structure
reccords, and it turns out the code is wrong (or for some reason i don't
understand the intended use of the API).
clang itself does not use that part of the API, so this flew under the
radar.
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r-- | llvm/lib/IR/DIBuilder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp index 30b79b6..0db82cd 100644 --- a/llvm/lib/IR/DIBuilder.cpp +++ b/llvm/lib/IR/DIBuilder.cpp @@ -509,7 +509,7 @@ DICompositeType *DIBuilder::createClassType( "createClassType should be called with a valid Context"); auto *R = DICompositeType::get( - VMContext, dwarf::DW_TAG_structure_type, Name, File, LineNumber, + VMContext, dwarf::DW_TAG_class_type, Name, File, LineNumber, getNonCompileUnitScope(Context), DerivedFrom, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements, RunTimeLang, VTableHolder, cast_or_null<MDTuple>(TemplateParams), UniqueIdentifier); |