llvm.org GIT mirror llvm / release_28 test / FrontendObjC / 2010-02-11-fwritable-stringsBug.m
release_28

Tree @release_28 (Download .tar.gz)

2010-02-11-fwritable-stringsBug.m @release_28raw · history · blame

// RUN: %llvmgcc -x objective-c -fwritable-strings -S %s -o - | FileCheck %s
// CHECK: @.str = private constant
// CHECK: @.str1 = internal global

// rdar://7634471

@class NSString;

@interface A
- (void)foo:(NSString*)msg;
- (void)bar:(const char*)msg;
@end

void func(A *a) {
  [a foo:@"Hello world!"];
  [a bar:"Goodbye world!"];
}