aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenObjC/parameterized_classes.m
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2020-12-30 20:45:56 -0800
committerFangrui Song <i@maskray.me>2020-12-30 20:52:01 -0800
commit6b3351792c6c9a362a3e8b826bc1d96f8e1918e0 (patch)
tree4329bff038ceb97ed2d1b8cf8653d35934960f5a /clang/test/CodeGenObjC/parameterized_classes.m
parent1d04cbeb4353ae9d39ca7e8c4de32b65e09bc390 (diff)
downloadllvm-6b3351792c6c9a362a3e8b826bc1d96f8e1918e0.zip
llvm-6b3351792c6c9a362a3e8b826bc1d96f8e1918e0.tar.gz
llvm-6b3351792c6c9a362a3e8b826bc1d96f8e1918e0.tar.bz2
[test] Add {{.*}} to make tests immune to dso_local/dso_preemptable/(none) differences
For a definition (of most linkage types), dso_local is set for ELF -fno-pic/-fpie and COFF, but not for Mach-O. This nuance causes unneeded binary format differences. This patch replaces (function) `define ` with `define{{.*}} `, (variable/constant/alias) `= ` with `={{.*}} `, or inserts appropriate `{{.*}} ` if there is an explicit linkage. * Clang will set dso_local for Mach-O, which is currently implied by TargetMachine.cpp. This will make COFF/Mach-O and executable ELF similar. * Eventually I hope we can make dso_local the textual LLVM IR default (write explicit "dso_preemptable" when applicable) and -fpic ELF will be similar to everything else. This patch helps move toward that goal.
Diffstat (limited to 'clang/test/CodeGenObjC/parameterized_classes.m')
-rw-r--r--clang/test/CodeGenObjC/parameterized_classes.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjC/parameterized_classes.m b/clang/test/CodeGenObjC/parameterized_classes.m
index c2ddb5b..11df89a 100644
--- a/clang/test/CodeGenObjC/parameterized_classes.m
+++ b/clang/test/CodeGenObjC/parameterized_classes.m
@@ -58,7 +58,7 @@ void getObjectsTest(NSMutableArray<NSString *> *array) {
void printMe(NSString *name) { }
-// CHECK-LABEL: define void @blockTest
+// CHECK-LABEL: define{{.*}} void @blockTest
void blockTest(NSMutableArray<void (^)(void)> *array, NSString *name) {
// CHECK-NOT: ret void
// CHECK: call i8* @llvm.objc.retainBlock