[clang] [CIR] vTableClassNameForType: return correct VTableClass name for Type::ObjCObjectPointer, Type::Pointer (PR #163850)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 24 11:55:43 PDT 2025
================
@@ -244,3 +244,32 @@ void throw_enum_class_expr() {
// OGCG: store i32 0, ptr %[[EXCEPTION_ADDR]], align 16
// OGCG: call void @__cxa_throw(ptr %[[EXCEPTION_ADDR]], ptr @_ZTIZ21throw_enum_class_exprvE4Test, ptr null)
// OGCG: unreachable
+
+void throw_pointer_type() {
----------------
n2h9 wrote:
It is mentioned in issue [description](https://github.com/llvm/llvm-project/issues/163601#issue-3518963479) that one way to test is to throw the proper type (it will execute the code part which this pr updates).
The test which I added does not execute the code which I updated. Instead of throwing pointer to int, we should throw pointer to object, then this case `case Type::Pointer:` will be executed in `vTableClassNameForType`.
https://github.com/llvm/llvm-project/pull/163850
More information about the cfe-commits
mailing list