[llvm] [DI] Have createClassType create a class type. (PR #102624)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 9 07:33:39 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: None (deadalnix)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/102624.diff
1 Files Affected:
- (modified) llvm/lib/IR/DIBuilder.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 30b79b6d6f60fd..0db82cdd6373c8 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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/102624
More information about the llvm-commits
mailing list