brintos

brintos / llvm-project-archived public Read only

0
0
Text · 960 B · 1f1f29f Raw
31 lines · c
1// RUN: %clang_cc1 -triple x86_64-windows -fms-extensions -Wno-implicit-function-declaration -emit-llvm %s -o - | FileCheck %s2 3// CHECK: %[[src:[0-9-]+]] = call ptr @llvm.localaddress()4// CHECK-NEXT: %cleanup.dest = load i32, ptr %cleanup.dest.slot, align 45// CHECK-NEXT: %[[src2:[0-9-]+]] = icmp ne i32 %cleanup.dest, 06// CHECK-NEXT: %[[src3:[0-9-]+]] = zext i1 %[[src2]] to i87// CHECK-NEXT: call void @"?fin$0@0@seh_abnormal_exits@@"(i8 noundef %[[src3]], ptr noundef %[[src]])8 9void seh_abnormal_exits(int *Counter) {10  for (int i = 0; i < 5; i++) {11    __try {12      if (i == 0)13        continue;   // abnormal termination14      else if (i == 1)15        goto t10;   // abnormal termination16      else if (i == 2)17        __leave;  // normal execution18      else if (i == 4)19        return;  // abnormal termination20    }21    __finally {22      if (AbnormalTermination()) {23        *Counter += 1;24      }25    }26  t10:;27  }28  return; // *Counter == 329}30 31