Skip to content

Commit fe312ec

Browse files
committed
minimize .ll test
1 parent 65f1741 commit fe312ec

File tree

1 file changed

+10
-37
lines changed

1 file changed

+10
-37
lines changed

llvm/test/Instrumentation/AddressSanitizer/asan-win-dont-instrument-catchpad.ll

Lines changed: 10 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -32,59 +32,32 @@
3232
; CHECK: %ex = alloca i32, align 4
3333
; CHECK: catchpad within %{{.*}} [ptr @"??_R0H@8", i32 0, ptr %ex]
3434

35-
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
3635
target triple = "x86_64-pc-windows-msvc"
3736

38-
%rtti.TypeDescriptor2 = type { ptr, ptr, [3 x i8] }
39-
%eh.ThrowInfo = type { i32, i32, i32, i32 }
40-
41-
@"??_R0H@8" = external global %rtti.TypeDescriptor2
42-
@_TI1H = external unnamed_addr constant %eh.ThrowInfo, section ".xdata"
43-
@"??_C@_03PMGGPEJJ@?$CFd?6?$AA@" = external dso_local unnamed_addr constant [4 x i8], align 1
37+
@"??_R0H@8" = external global ptr
4438

4539
; Function Attrs: mustprogress noinline norecurse optnone uwtable sanitize_address
46-
define dso_local noundef i32 @main() #0 personality ptr @__CxxFrameHandler3 {
40+
define noundef i32 @main() sanitize_address personality ptr @__CxxFrameHandler3 {
4741
entry:
48-
%retval = alloca i32, align 4
49-
%tmp = alloca i32, align 4
5042
%ex = alloca i32, align 4
51-
store i32 0, ptr %retval, align 4
52-
store i32 1, ptr %tmp, align 4
53-
invoke void @_CxxThrowException(ptr %tmp, ptr @_TI1H) #2
43+
invoke void @throw()
5444
to label %unreachable unwind label %catch.dispatch
5545

5646
catch.dispatch: ; preds = %entry
5747
%0 = catchswitch within none [label %catch] unwind to caller
5848

5949
catch: ; preds = %catch.dispatch
6050
%1 = catchpad within %0 [ptr @"??_R0H@8", i32 0, ptr %ex]
61-
%2 = load i32, ptr %ex, align 4
62-
%call = call i32 (ptr, ...) @printf(ptr noundef @"??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 noundef %2) [ "funclet"(token %1) ]
63-
store i32 -1, ptr %retval, align 4
64-
catchret from %1 to label %catchret.dest
65-
66-
catchret.dest: ; preds = %catch
67-
br label %return
68-
69-
try.cont: ; No predecessors!
70-
store i32 0, ptr %retval, align 4
71-
br label %return
51+
call void @opaque() [ "funclet"(token %1) ]
52+
catchret from %1 to label %return
7253

73-
return: ; preds = %try.cont, %catchret.dest
74-
%3 = load i32, ptr %retval, align 4
75-
ret i32 %3
54+
return: ; preds = %catch
55+
ret i32 0
7656

7757
unreachable: ; preds = %entry
7858
unreachable
7959
}
8060

81-
declare dso_local void @_CxxThrowException(ptr, ptr)
82-
83-
declare dso_local i32 @__CxxFrameHandler3(...)
84-
85-
; Function Attrs: mustprogress noinline optnone uwtable
86-
declare dso_local i32 @printf(ptr noundef, ...) #1
87-
88-
attributes #0 = { mustprogress noinline norecurse optnone uwtable sanitize_address }
89-
attributes #1 = { mustprogress noinline optnone uwtable }
90-
attributes #2 = { noreturn }
61+
declare void @throw() noreturn
62+
declare void @opaque()
63+
declare i32 @__CxxFrameHandler3(...)

0 commit comments

Comments
 (0)