From ff340ad56aea2689d1fdcabf2e7655dd953dc278 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Sat, 19 Jan 2019 20:46:10 +0000 Subject: [PATCH] [FIX] Generalize the expected results for callback clang tests git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@351665 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/callback_annotated.c | 20 +++++++++----------- test/CodeGen/callback_pthread_create.c | 6 ++---- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/test/CodeGen/callback_annotated.c b/test/CodeGen/callback_annotated.c index 5a4314c60b..feacda2754 100644 --- a/test/CodeGen/callback_annotated.c +++ b/test/CodeGen/callback_annotated.c @@ -30,22 +30,20 @@ __attribute__((callback(4, d, 5, 2))) void *broker5(int, int, int, int (*callee) static void *VoidPtr2VoidPtr(void *payload) { // RUN2: ret i8* %payload - // IPCP: ret i8* null + // IPCP: ret i8* null return payload; } static int ThreeInt2Int(int a, int b, int c) { - // RUN2: define internal i32 @ThreeInt2Int(i32 %a, i32 %b, i32 %c) - // RUN2-NEXT: entry: - // RUN2-NEXT: %mul = mul nsw i32 %b, %a - // RUN2-NEXT: %add = add nsw i32 %mul, %c - // RUN2-NEXT: ret i32 %add + // RUN2: define internal i32 @ThreeInt2Int(i32 %a, i32 %b, i32 %c) + // RUN2: %mul = mul nsw i32 %b, %a + // RUN2: %add = add nsw i32 %mul, %c + // RUN2: ret i32 %add - // IPCP: define internal i32 @ThreeInt2Int(i32 %a, i32 %b, i32 %c) - // IPCP-NEXT: entry: - // IPCP-NEXT: %mul = mul nsw i32 4, %a - // IPCP-NEXT: %add = add nsw i32 %mul, %c - // IPCP-NEXT: ret i32 %add + // IPCP: define internal i32 @ThreeInt2Int(i32 %a, i32 %b, i32 %c) + // IPCP: %mul = mul nsw i32 4, %a + // IPCP: %add = add nsw i32 %mul, %c + // IPCP: ret i32 %add return a * b + c; } diff --git a/test/CodeGen/callback_pthread_create.c b/test/CodeGen/callback_pthread_create.c index fdcbe973c4..eb92a3c473 100644 --- a/test/CodeGen/callback_pthread_create.c +++ b/test/CodeGen/callback_pthread_create.c @@ -14,15 +14,13 @@ const int GlobalVar = 0; static void *callee0(void *payload) { // IPCP: define internal i8* @callee0 -// IPCP-NEXT: entry: -// IPCP-NEXT: ret i8* null +// IPCP: ret i8* null return payload; } static void *callee1(void *payload) { // IPCP: define internal i8* @callee1 -// IPCP-NEXT: entry: -// IPCP-NEXT: ret i8* bitcast (i32* @GlobalVar to i8*) +// IPCP: ret i8* bitcast (i32* @GlobalVar to i8*) return payload; } -- 2.40.0