Skip to content

Commit

Permalink
Fix gmodules class extension crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael137 committed Dec 12, 2024
1 parent 538ffb3 commit bb97b44
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# REQUIRES: system-darwin

# Test that TODO...
#
# RUN: split-file %s %t
# RUN: %clangxx_host %t/lib.m -c -g -gmodules -fmodules -o %t/lib.o
# RUN: %clangxx_host %t/main.m -g -gmodules -fmodules %t/lib.o -o %t/a.out -framework Foundation
#
# RUN: %lldb %t/a.out -o "breakpoint set -f lib.m -l 6" -o exit | FileCheck %s

# CHECK: (lldb) breakpoint set -f lib.m -l 6
# CHECK: Breakpoint 1: where = a.out`-[NSObject(Foo) func]

#--- main.m
int main() {
return 0;
}

#--- lib.m
#import <Foundation/Foundation.h>

@implementation NSObject (Foo)
- (NSError *)func {
NSLog(@"Hello, World!");
return 0;
}
@end

NSObject * func() {
return 0;
}

0 comments on commit bb97b44

Please sign in to comment.