diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-18 15:59:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-18 15:59:24 +0000 |
commit | 1c15cd6aaa5d1aa4d0d9226381be71eb9746787e (patch) | |
tree | d2b532cc9425d7c942d22a1ad6d7c65128f1ea85 /clang/test/CodeGenObjC | |
parent | 6168bd2323cdf2ff1dc4174c6fc4cd6a479f001b (diff) | |
download | bcm5719-llvm-1c15cd6aaa5d1aa4d0d9226381be71eb9746787e.tar.gz bcm5719-llvm-1c15cd6aaa5d1aa4d0d9226381be71eb9746787e.zip |
CodeGenFunction::CurFuncDecl can be NULL; fix crash introduced in r175386.
llvm-svn: 175448
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r-- | clang/test/CodeGenObjC/ivar-invariant.m | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjC/ivar-invariant.m b/clang/test/CodeGenObjC/ivar-invariant.m index 7552e7a8a39..7cafee70073 100644 --- a/clang/test/CodeGenObjC/ivar-invariant.m +++ b/clang/test/CodeGenObjC/ivar-invariant.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin -fblocks -emit-llvm -o - %s | FileCheck %s @interface NSObject + (id) new; @@ -54,3 +54,15 @@ void * variant_load_1(int i) { // CHECK: define internal i8* @"\01-[Container invariant_load_1]" // CHECK: [[IVAR:%.*]] = load i64* @"OBJC_IVAR_$_Derived.member", !invariant.load +@interface ForBlock +{ +@public + id foo; +} +@end + +// CHECK: define internal i8* @block_block_invoke +// CHECK: load i64* @"OBJC_IVAR_$_ForBlock.foo" +id (^block)(ForBlock*) = ^(ForBlock* a) { + return a->foo; +}; |