1// RUN: %clang_cc1 -fblocks -fobjc-arc -fobjc-runtime-has-weak -g -triple x86_64-apple-darwin -O0 -emit-llvm %s -o - | FileCheck %s 2 3// Test that the foo is aligned at an 8 byte boundary in the DWARF 4// expression (256) that locates it inside of the byref descriptor: 5// CHECK: metadata !"foo", i32 0, i64 {{[0-9]+}}, i64 64, i64 256, i32 0, metadata 6 7typedef unsigned char uint8_t; 8@protocol NSObject 9@end 10@interface NSObject <NSObject> { 11} 12@end 13typedef void (^dispatch_block_t)(void); 14typedef long dispatch_once_t; 15static __inline__ __attribute__((__always_inline__)) __attribute__((__nonnull__)) __attribute__((__nothrow__)) 16void 17_dispatch_once(dispatch_once_t *predicate, dispatch_block_t block) 18{ 19}; 20typedef struct Buffer *BufferRef; 21typedef struct Foo_s { 22 uint8_t *data; 23} Foo; 24@protocol DelegateProtocol <NSObject> 25@end 26@interface FileReader : NSObject <DelegateProtocol> 27{ 28 dispatch_once_t offset; 29} 30@end 31@implementation FileReader 32- (BufferRef) bar:(int *)index 33{ 34 __attribute__((__blocks__(byref))) Foo foo; 35 _dispatch_once(&offset, ^{}); 36 return 0; 37} 38@end 39