From 3fa946a8442e1b8d4fdbdc9b9b7e8c12a0f77dcc Mon Sep 17 00:00:00 2001 From: deadalnix Date: Tue, 13 Aug 2024 12:12:29 +0200 Subject: [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. --- llvm/lib/IR/DIBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/IR/DIBuilder.cpp') 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(TemplateParams), UniqueIdentifier); -- cgit v1.1