r219850 - test: simplify test further
Saleem Abdulrasool
compnerd at compnerd.org
Wed Oct 15 14:37:52 PDT 2014
Author: compnerd
Date: Wed Oct 15 16:37:52 2014
New Revision: 219850
URL: http://llvm.org/viewvc/llvm-project?rev=219850&view=rev
Log:
test: simplify test further
Remove the use of an unnecessary function. NFC.
Modified:
cfe/trunk/test/CodeGen/mangle-blocks.c
Modified: cfe/trunk/test/CodeGen/mangle-blocks.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/mangle-blocks.c?rev=219850&r1=219849&r2=219850&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/mangle-blocks.c (original)
+++ cfe/trunk/test/CodeGen/mangle-blocks.c Wed Oct 15 16:37:52 2014
@@ -2,10 +2,13 @@
void __assert_rtn(const char *, const char *, int, const char *)
__attribute__ (( noreturn ));
-void invoke(void (^)(void));
-void mangle(void) {
- invoke(^{ invoke(^{ __assert_rtn(__func__, __FILE__, __LINE__, "mangle"); }); });
+void (^mangle(void))(void) {
+ return ^{
+ void (^block)(void) = ^{
+ __assert_rtn(__func__, __FILE__, __LINE__, "mangle");
+ };
+ };
}
// CHECK: @__func__.__mangle_block_invoke_2 = private unnamed_addr constant [24 x i8] c"__mangle_block_invoke_2\00", align 1
@@ -15,6 +18,6 @@ void mangle(void) {
// CHECK: define internal void @__mangle_block_invoke(i8* %.block_descriptor)
// CHECK: define internal void @__mangle_block_invoke_2(i8* %.block_descriptor){{.*}}{
-// CHECK: call void @__assert_rtn(i8* getelementptr inbounds ([24 x i8]* @__func__.__mangle_block_invoke_2, i32 0, i32 0), i8* getelementptr inbounds {{.*}}, i32 8, i8* getelementptr inbounds ([7 x i8]* @.str1, i32 0, i32 0))
+// CHECK: call void @__assert_rtn(i8* getelementptr inbounds ([24 x i8]* @__func__.__mangle_block_invoke_2, i32 0, i32 0), i8* getelementptr inbounds {{.*}}, i32 9, i8* getelementptr inbounds ([7 x i8]* @.str1, i32 0, i32 0))
// CHECK: }
More information about the cfe-commits
mailing list