diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2019-03-31 11:22:26 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2019-03-31 11:22:26 +0000 |
commit | 17d429535984588410f45b48f754f267fa1754a5 (patch) | |
tree | 1cf0f057bde95a4d0569205ea4018273f9d98bdc /clang/test/CodeGenObjC | |
parent | 0e9e02cd723ebd9f0dadc7a995329eb505e35d45 (diff) | |
download | bcm5719-llvm-17d429535984588410f45b48f754f267fa1754a5.tar.gz bcm5719-llvm-17d429535984588410f45b48f754f267fa1754a5.zip |
COMDAT-fold block descriptors.
Without this change, linking multiple objects containing block
descriptors together on Windows will generate duplicate symbol errors.
Patch by Dustin Howett!
Differential Revision: https://reviews.llvm.org/D58807
llvm-svn: 357363
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r-- | clang/test/CodeGenObjC/block-desc-str.m | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/test/CodeGenObjC/block-desc-str.m b/clang/test/CodeGenObjC/block-desc-str.m index 44d2f214330..890a214ae66 100644 --- a/clang/test/CodeGenObjC/block-desc-str.m +++ b/clang/test/CodeGenObjC/block-desc-str.m @@ -1,9 +1,13 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-freebsd -emit-llvm -fobjc-runtime=gnustep-1.7 -fblocks -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fobjc-runtime=gcc -fblocks -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-unknown-freebsd -emit-llvm -fobjc-runtime=gnustep-1.7 -fblocks -o - %s | FileCheck --check-prefix=CHECK-COMDAT %s +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -fobjc-runtime=gcc -fblocks -o - %s | FileCheck --check-prefix=CHECK-COMDAT %s // RUN: %clang_cc1 -triple=x86_64-apple-darwin10 -emit-llvm -fblocks -o - %s | FileCheck %s // Test that descriptor symbol names don't include '@'. +// CHECK-COMDAT: $"__block_descriptor_40_8_32o_e5_v8\01?0l" = comdat any +// CHECK-COMDAT: @[[STR:.*]] = private unnamed_addr constant [6 x i8] c"v8@?0\00" +// CHECK-COMDAT: @"__block_descriptor_40_8_32o_e5_v8\01?0l" = linkonce_odr hidden unnamed_addr constant { i64, i64, i8*, i8*, i8*, {{.*}} } { i64 0, i64 40, i8* bitcast ({{.*}} to i8*), i8* bitcast ({{.*}} to i8*), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @[[STR]], i32 0, i32 0), {{.*}} }, comdat, align 8 + // CHECK: @[[STR:.*]] = private unnamed_addr constant [6 x i8] c"v8@?0\00" // CHECK: @"__block_descriptor_40_8_32o_e5_v8\01?0l" = linkonce_odr hidden unnamed_addr constant { i64, i64, i8*, i8*, i8*, {{.*}} } { i64 0, i64 40, i8* bitcast ({{.*}} to i8*), i8* bitcast ({{.*}} to i8*), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @[[STR]], i32 0, i32 0), {{.*}} }, align 8 |