[clang] e4d3426 - [clang][bytecode] Ignore CPointerToObjCPointerCasts (#109760)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 24 01:18:37 PDT 2024
Author: Timm Baeder
Date: 2024-09-24T10:18:33+02:00
New Revision: e4d34261f85050af340ade9a7dcd332f11b4485f
URL: https://github.com/llvm/llvm-project/commit/e4d34261f85050af340ade9a7dcd332f11b4485f
DIFF: https://github.com/llvm/llvm-project/commit/e4d34261f85050af340ade9a7dcd332f11b4485f.diff
LOG: [clang][bytecode] Ignore CPointerToObjCPointerCasts (#109760)
Added:
Modified:
clang/lib/AST/ByteCode/Compiler.cpp
clang/test/AST/ByteCode/codegen.m
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp
index e89863a231bed4..939a3aa43ff8dd 100644
--- a/clang/lib/AST/ByteCode/Compiler.cpp
+++ b/clang/lib/AST/ByteCode/Compiler.cpp
@@ -431,6 +431,7 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *CE) {
case CK_NoOp:
case CK_UserDefinedConversion:
case CK_AddressSpaceConversion:
+ case CK_CPointerToObjCPointerCast:
return this->delegate(SubExpr);
case CK_BitCast: {
diff --git a/clang/test/AST/ByteCode/codegen.m b/clang/test/AST/ByteCode/codegen.m
index 08c3d9a70b36d7..6139596c6337a2 100644
--- a/clang/test/AST/ByteCode/codegen.m
+++ b/clang/test/AST/ByteCode/codegen.m
@@ -10,3 +10,8 @@
//
// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1
id a = @"Hello World!";
+
+extern void OBJC_CLASS_$_f;
+Class c = (Class)&OBJC_CLASS_$_f;
+// CHECK: @c ={{.*}} global ptr @"OBJC_CLASS_$_f"
+// CHECK: @"OBJC_CLASS_$_f" ={{.*}} global %struct._class_t
More information about the cfe-commits
mailing list