diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-11 16:29:35 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-11 16:29:35 +0000 |
commit | 46faa67da1d7e9450e8fa363f6633e2c68e33ff1 (patch) | |
tree | ba7f8dbcd8358d07c15d1da6c2c2cc38f0febeb6 /test/CodeGen | |
parent | 874094833caedbee43fd17cca164dec53d500bdc (diff) | |
download | src-46faa67da1d7e9450e8fa363f6633e2c68e33ff1.tar.gz src-46faa67da1d7e9450e8fa363f6633e2c68e33ff1.zip |
Vendor import of clang release_70 branch r339355:vendor/clang/clang-release_70-r339355
Notes
Notes:
svn path=/vendor/clang/dist-release_70/; revision=337633
svn path=/vendor/clang/clang-release_70-r339355/; revision=337634; tag=vendor/clang/clang-release_70-r339355
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/global-blocks-win32.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/global-blocks-win32.c b/test/CodeGen/global-blocks-win32.c new file mode 100644 index 000000000000..7a66c924b420 --- /dev/null +++ b/test/CodeGen/global-blocks-win32.c @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -fblocks -triple i386-pc-windows-msvc %s -emit-llvm -o - -fblocks | FileCheck %s + + +int (^x)(void) = ^() { return 21; }; + + +// Check that the block literal is emitted with a null isa pointer +// CHECK: @__block_literal_global = internal global { i8**, i32, i32, i8*, %struct.__block_descriptor* } { i8** null, + +// Check that _NSConcreteGlobalBlock has the correct dllimport specifier. +// CHECK: @_NSConcreteGlobalBlock = external dllimport global i8* +// Check that we create an initialiser pointer in the correct section (early library initialisation). +// CHECK: @.block_isa_init_ptr = internal constant void ()* @.block_isa_init, section ".CRT$XCLa" + +// Check that we emit an initialiser for it. +// CHECK: define internal void @.block_isa_init() { +// CHECK: store i8** @_NSConcreteGlobalBlock, i8*** getelementptr inbounds ({ i8**, i32, i32, i8*, %struct.__block_descriptor* }, { i8**, i32, i32, i8*, %struct.__block_descriptor* }* @__block_literal_global, i32 0, i32 0), align 4 + |