Skip to content

Commit e4d3426

Browse files
authored
[clang][bytecode] Ignore CPointerToObjCPointerCasts (#109760)
1 parent 3dbd929 commit e4d3426

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ bool Compiler<Emitter>::VisitCastExpr(const CastExpr *CE) {
431431
case CK_NoOp:
432432
case CK_UserDefinedConversion:
433433
case CK_AddressSpaceConversion:
434+
case CK_CPointerToObjCPointerCast:
434435
return this->delegate(SubExpr);
435436

436437
case CK_BitCast: {

clang/test/AST/ByteCode/codegen.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
//
1111
// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1
1212
id a = @"Hello World!";
13+
14+
extern void OBJC_CLASS_$_f;
15+
Class c = (Class)&OBJC_CLASS_$_f;
16+
// CHECK: @c ={{.*}} global ptr @"OBJC_CLASS_$_f"
17+
// CHECK: @"OBJC_CLASS_$_f" ={{.*}} global %struct._class_t

0 commit comments

Comments
 (0)