diff options
Diffstat (limited to 'test/Instrumentation')
-rw-r--r-- | test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt | 7 | ||||
-rw-r--r-- | test/Instrumentation/DataFlowSanitizer/abilist.ll | 15 |
2 files changed, 17 insertions, 5 deletions
diff --git a/test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt b/test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt index 42e34e4..97ce5e6 100644 --- a/test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt +++ b/test/Instrumentation/DataFlowSanitizer/Inputs/abilist.txt @@ -4,8 +4,5 @@ fun:discard*=discard fun:functional=uninstrumented fun:functional=functional -fun:custom1=uninstrumented -fun:custom1=custom - -fun:custom2=uninstrumented -fun:custom2=custom +fun:custom*=uninstrumented +fun:custom*=custom diff --git a/test/Instrumentation/DataFlowSanitizer/abilist.ll b/test/Instrumentation/DataFlowSanitizer/abilist.ll index 4e23bf1..66ddc14 100644 --- a/test/Instrumentation/DataFlowSanitizer/abilist.ll +++ b/test/Instrumentation/DataFlowSanitizer/abilist.ll @@ -16,6 +16,10 @@ declare void @custom1(i32 %a, i32 %b) declare i32 @custom2(i32 %a, i32 %b) +declare void @customcb(i32 (i32)* %cb) + +declare i32 @cb(i32) + ; CHECK: @"dfs$f" define void @f() { ; CHECK: %[[LABELRETURN:.*]] = alloca i16 @@ -26,6 +30,9 @@ define void @f() { ; CHECK: call i32 @__dfsw_custom2(i32 1, i32 2, i16 0, i16 0, i16* %[[LABELRETURN]]) call i32 @custom2(i32 1, i32 2) + ; CHECK: call void @__dfsw_customcb({{.*}} @"dfst0$customcb", i8* bitcast ({{.*}} @"dfs$cb" to i8*), i16 0) + call void @customcb(i32 (i32)* @cb) + ret void } @@ -58,3 +65,11 @@ define i32 (i32, i32)* @g(i32) { ; CHECK: declare void @__dfsw_custom1(i32, i32, i16, i16) ; CHECK: declare i32 @__dfsw_custom2(i32, i32, i16, i16, i16*) + +; CHECK-LABEL: define linkonce_odr i32 @"dfst0$customcb"(i32 (i32)*, i32, i16, i16*) +; CHECK: %[[BC:.*]] = bitcast i32 (i32)* %0 to { i32, i16 } (i32, i16)* +; CHECK: %[[CALL:.*]] = call { i32, i16 } %[[BC]](i32 %1, i16 %2) +; CHECK: %[[XVAL0:.*]] = extractvalue { i32, i16 } %[[CALL]], 0 +; CHECK: %[[XVAL1:.*]] = extractvalue { i32, i16 } %[[CALL]], 1 +; CHECK: store i16 %[[XVAL1]], i16* %3 +; CHECK: ret i32 %[[XVAL0]] |