forked from OSchip/llvm-project
[FIX] Generalize the expected results for callback clang tests
llvm-svn: 351665
This commit is contained in:
parent
f9c2f2c0b7
commit
685a9ea294
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue