From a2d7c34e93ad7e33af3e9a9052b7530f697fbc67 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 7 Jun 2010 19:39:39 +0000 Subject: Fixed a block regression caused by trying to use an existing ir for load of a bock variable. This cannot be done across basic blocks. Fixes radar 8064140. llvm-svn: 105549 --- clang/test/CodeGenObjC/blocks-5.m | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 clang/test/CodeGenObjC/blocks-5.m (limited to 'clang/test/CodeGenObjC/blocks-5.m') diff --git a/clang/test/CodeGenObjC/blocks-5.m b/clang/test/CodeGenObjC/blocks-5.m new file mode 100644 index 00000000000..2d48b46a431 --- /dev/null +++ b/clang/test/CodeGenObjC/blocks-5.m @@ -0,0 +1,37 @@ +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -emit-llvm -fblocks -o %t %s + +// rdar: // 8064140 + +@interface IDEWorkspaceDocument +{ + id _defaultEditorStateTree; +} +- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key, id obj, unsigned char *stop))block ; +@end + + + +int foo(); +extern void DVT (volatile const void * object, volatile const void * selector, const char * functionName); +@implementation IDEWorkspaceDocument + +- (void)stateSavingDefaultEditorStatesForURLs { + [_defaultEditorStateTree enumerateKeysAndObjectsUsingBlock:^(id identifier, id urlsToEditorStates, unsigned char *stop) { + do{ +if (foo() ) + DVT(&self,&_cmd,__PRETTY_FUNCTION__); + +}while(0); + + do{ + DVT(&self,&_cmd,__PRETTY_FUNCTION__); + }while(0); + + + }]; + +} + +- (void)enumerateKeysAndObjectsUsingBlock:(void (^)(id key, id obj, unsigned char *stop))block {} + +@end -- cgit v1.2.3